Requiredfieldvalidtor in asp.net stops me from going back?
When a user clicks a link, he's sent to a register form. In this form I have certain fields that need to be filled in. So I use required field validator on them.
On the page there is also a Back button, incase the user doesn't want to register. But when you press back, it says you need to fill in the fields or y开发者_JAVA百科ou won't go back.
Any suggestions on how this can be resolved?
Set the CausesValidation property on the back button to false:
<asp:Button id="btnBack" runat="server" CausesValidation="false" OnClick="btnBack_Click" Text="Back" />
精彩评论