G
Guest
I have a text box that is validated using an asp:requiredfieldvalidator.
There is an asp button control that posts back to the server. When the button
is pressed, if there is no data in the text box then the
asp:requiredfieldvalidator message lights up as expected and prevents post
back. This works as expected.
However, I also have an anchor link on the pages such as <a href="#" onclick
= "MyPostBackJavaScript" />
When this link is pressed, the page posts back as expected, however, on
return the asp:requiredfieldvalidator is lit. If I put text in the textbox
then click the link, the asp:requiredfieldvalidator won't light up.
The anchor link should not cause validation at all. Can someone tell me what
might be going on here?
There is an asp button control that posts back to the server. When the button
is pressed, if there is no data in the text box then the
asp:requiredfieldvalidator message lights up as expected and prevents post
back. This works as expected.
However, I also have an anchor link on the pages such as <a href="#" onclick
= "MyPostBackJavaScript" />
When this link is pressed, the page posts back as expected, however, on
return the asp:requiredfieldvalidator is lit. If I put text in the textbox
then click the link, the asp:requiredfieldvalidator won't light up.
The anchor link should not cause validation at all. Can someone tell me what
might be going on here?