I have a required field validator to validate a dropdownlist. this dropdownlist is an autopostback one, and it's causevalidation property is set to be false.
the issue is, when I select the default item, the validation message shows, but the still do the postback. And after the postback, the message disappers.
here is the snippet of codes:
<asp:RequiredFieldValidator ID="ContactMethodRequired" runat="server" ControlToValidate="ContactPreferences"
Display="Dynamic" ErrorMessage="Please choose your contact method"
EnableClientScript="true" InitialValue=""></asp:RequiredFieldValidator>
<div>
<asp:DropDownList ID="ContactPreferences" runat="server" AutoPostBack="true" CausesValidation="false">
<asp:ListItem Text="Select" Value="" Selected="True"></asp:ListItem>
<asp:ListItem Text="Email" Value="Email"></asp:ListItem>
<asp:ListItem Text="Phone" Value="Phone"></asp:ListItem>
</asp:DropDownList>
</div>