drop down menu - How to set a value dynamically for dropdownlist in code behind C# -
i need set value "y" dropdownlist control dynamically.when tried selectedvalue gave error object reference null .plz help
first make sure y there inside asp:dropdownlist
. this
if (dropdownlist1.items.findbyvalue("y") != null) { dropdownlist1.items.findbyvalue("y").selected = true; }
Comments
Post a Comment