1
Answer

mvc 4 how to dropdown list in alphabetical order

Nizam Nizam

Nizam Nizam

9y
630
1
public ActionResult Custom()
{
ViewBag.SmsSubject =
new SelectList(db.Sms_UserTemplate.Where(a => a.SchoolId == SessionValues.Current.School.SchoolId),
"TempId", "SmsSubject");
return View("Custom",new Sms_UserTemplate());
}
Answers (1)