0

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" && m.int_Priority >= Authorization.Priority && m.bit_Active == true).ToList(), "int_GroupId", "vcr_GroupName");

1 Answer 1

2

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"); 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.