Add WebCms
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WebCms.Models
|
||||
{
|
||||
public class SelectListViewModel
|
||||
{
|
||||
public SelectList ListItems { get; set; }
|
||||
public string Selected { get; set; }
|
||||
|
||||
public SelectListItem SelectedItem
|
||||
{
|
||||
get { return ListItems.FirstOrDefault(li => li.Value == Selected); }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Selected;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user