Hi,
I have a model from database, to which I added a property to get the FullName like
I then add this code in Controller as follows
In _test.cshtml, how do I get this sList through model? Please help
Thanks
I have a model from database, to which I added a property to get the FullName like
C#:
public string FullName
{
get
{
return Firstname + " " + LastName;
}
}
I then add this code in Controller as follows
C#:
public ActionResult GetList()
{
SelectList sList = new SelectList { db.Details, "Id", "FullName"};
return PartialView("_test",sList);
}
In _test.cshtml, how do I get this sList through model? Please help
Thanks