Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static SelectList GetFrequencyDDL(string selected)
- {
- IEnumerable<SitemapChangeFrequency> actionTypes = Enum.GetValues(typeof(SitemapChangeFrequency)).Cast<SitemapChangeFrequency>();
- var temp = new SelectList(from action in actionTypes
- select new SelectListItem
- {
- Text = action.ToString(),
- Value = ((int)action).ToString(),
- Selected = selected == ((int)action).ToString()
- }, "Value", "Text");
- return temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement