by using selectlist how can i enter the please select. is there a way
GrpDown = new SelectList(_db.Groups.Where(m => m.vcr_GroupName != "SuperAdmin" &am开发者_开发技巧p;& m.int_Priority >= Authorization.Priority && m.bit_Active == true).ToList(), "int_GroupId", "vcr_GroupName");
I hope I've understoon your question. Try something along these lines:
var ListOfThings = _db.Groups.Where(m => m.vcr_GroupName != "SuperAdmin" && m.int_Priority >= Authorization.Priority && m.bit_Active == true).ToList();
ListOfThings.Insert(0, "Please Select"); // <-- Here you want to enter an item that has the caption "Please Select"
GrpDown = new SelectList(ListOfThings, "int_GroupId", "vcr_GroupName");
精彩评论