/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
ddlSizeGuide.DataBind(); string sizeGuideId = dtbProductDeb.Rows[0]["sizeGuideId"].ToString(); ListItem liSizeGuide = ddlSizeGuide.Items.FindByValue(sizeGuideId); int indexOfDD = ddlSizeGuide.Items.IndexOf(liSizeGuide); ddlSizeGuide.SelectedIndex = indexOfDD;