Posted By

housecor on 09/09/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Dropdown with databind example and default value


 / Published in: C#
 

  1. cboLocation.DataSource = GetLocations()
  2. cboLocation.DataTextField = "StateCityLabel"
  3. cboLocation.DataValueField = "LocationCode"
  4. cboLocation.DataBind()
  5. cboLocation.Items.Insert(0, New ListItem("Select Location...", ""))

Report this snippet  

You need to login to post a comment.