I was trying to perform Autopostback on Asp.net DropDownList, Selection and found that it was working in IE and Firefox, but not working in Chrome.
Cause of Problem
Required field Validator control is not working as expected for DropDownList Control
Solution to perform Page Postback on making selection to DropDownList
You need to set EnableClientScript="false" in order to make it work in Chrome.
Example:
<asp:DropDownList ID="ddlLanguage" runat="server" TabIndex="1"
ToolTip="Select Language" Width="190" AutoPostBack="true"
onselectedindexchanged="ddlLanguage_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="rfvLanguage" runat="server" EnableClientScript="false" ControlToValidate="ddlLanguage" InitialValue="0" TabIndex="1" Text="*" ErrorMessage="<b>Please Select Language</b>" Display="None"></asp:RequiredFieldValidator>
3 comments:
Thanks it work so good.
thanks for sharing! :)
Thanks for sharing! It work good :)
Post a Comment