views:

132

answers:

1

My requiredfield control is validating the "SEL"(default invalid value) value but when I do change the value to a valid one, the ErrorMessage/Text does not disappear until I submit the form again.

<asp:DropDownList ID="ddlDocumentType" runat="server" DataTextField="Description" DataValueField="Code" />
 <asp:RequiredFieldValidator ControlToValidate="ddlDocumentType" Text="*" ID="rfvDocumentType" runat="server" Display="Dynamic" InitialValue="SEL" />

It happens in all my dropdownlists/requiredfieldvalidators. How does the Text/ErrorMessage disappear when I change the value on the dropdownlist ? I'm guessing it has to disappear when the option is valid !

Thanks,

A: 

A similar question is discussed here. I think the problem is the way validation javascript works. Just to try, you can also add EnableClientScript=true attribute.

lakhlaniprashant.blogspot.com
EnableClientScript="true" is the default setting isn't it?
mgroves
EnableClientScript="true" didn't solve my problem ..
Daniel