Wednesday, 7 July 2010

SETTING ACTIVE ITEM IN DROPDOWNLIST

  1. ddlSizeGuide.DataBind();
  2. string sizeGuideId = dtbProductDeb.Rows[0]["sizeGuideId"].ToString();
  3. ListItem liSizeGuide = ddlSizeGuide.Items.FindByValue(sizeGuideId);
  4. int indexOfDD = ddlSizeGuide.Items.IndexOf(liSizeGuide);
  5. ddlSizeGuide.SelectedIndex = indexOfDD;

No comments:

Post a Comment