开发者

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" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜