There are two DropDownList controls in my form.
1st is on and the second is off.
After selecting the 1st drop-down list, I change the selected value of the 2nd drop-down list using javascript.
Works great. But when I try to get the selected value of the second drop-down list, it will return the value of the first element (ie, "Select").
Please write my code
<asp:DropDownList ID="ddlStartTime1" runat="server" AutoPostBack="false" Width="70" Enabled="false"></asp:DropDownList>
NOTE: I use javascript to change the selected value of the 2nd (disabled) drop-down list.
Javascript Code:
$(document).ready(function() { $('#<%= ddlStartTime1.ClientID %>').change(function() { $('#<%= ddlEndTime1.ClientID %>').val($('#<%= ddlStartTime1.ClientID%>').val()); }) });
Is there an alternative way to get the modified value of a disabled DropDownList?
source share