DropDownList 'Please select' text

I have an ASP DropDownList and I would like to add an Item which reads 'Please Select'. However I don't want the user to be able to select the 'Please Select' item (it would just be for show).

Is this possible
Who is Participating?

Improve company productivity with a Business Account.Sign Up

DeathraceConnect With a Mentor Commented:
You can add an item "Please Select" but i'm not sure whether we cann't select it. Try a sever-side validation, using dropdownlist.selectedtext to identify the items.
if its equal to "Please Select" do nothing
do something
jinalConnect With a Mentor Commented:
You can put javascript validation for that.

As you are using ASP.net you can use required field validation for that.

<asp:RequiredFieldValidator ID="valid1" runat="server" ControlToValidate="drpDropDown" InitialValue="Please select" />
spprivateConnect With a Mentor Commented:
Try this
dropdownlist.Items(0).Enabled = False
Mr_ShawAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.