Nizam Nizam

Nizam Nizam

  • NA
  • 32
  • 21.1k

mvc 4 how to dropdown list in alphabetical order

Apr 16 2015 1:03 AM
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)