Posted By

housecor on 11/03/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Add default value for dropdownlist


 / Published in: C#
 

  1. ddMyDropdown.Items.Insert(0, "Select a Title");
  2.  
  3. //or, to set value explicitly to null:
  4. ddAffiliation.Items.Insert(0, new ListItem("Select Affiliation", null));

Report this snippet  

You need to login to post a comment.