c# - Static Dropdown populating incorrect value -
i have static dropdown following html.
<asp:dropdownlist width="100px" id="dropdownactive" runat="server"> <asp:listitem text="inactive" value="0"/> <asp:listitem text="active" value="1" /> </asp:dropdownlist>
i try populate selected value based off of data, has the value of 0 before , not accept new value.
dropdownactive.selectedvalue = (support.active)? "active": "inactive";
the values of dropdown "0" , "1", not "active" , "inactive"
dropdownactive.selectedvalue = (support.active)? "1": "0";
Comments
Post a Comment