My contemplations and diurnal novelties are publicized here


Some time we need to use “——–” inside a drop down list. Now we have to take care that the user shouldn’t be able to select this line. You can simply work around this problem by setting the value of the that item similar to the field you want to get selected like
e.g
ddlVehicle.Items.Add(new ListItem(“–Select– “, “0”, true));
ddlVehicle.Items.Add(new ListItem(“Test1 “, “1”, true));
ddlVehicle.Items.Add(new ListItem(“———–“, “0”, true));
ddlVehicle.Items.Add(new ListItem(“Test2”, “2”, true));

once you select —– it will show –select– instead of ——.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: