Reputation: 55
i got a little problem with the RequiredFieldValidation on asp.net. what i want to happen is when i click the "Log out" button the required field errors wont show up. i just want to know how to control this little beasts. that when i only press "Submit" button that is the only time they would check on errors, and when i press "Logout" button they would just sit there and wont show up.
Upvotes: 0
Views: 45
Reputation: 703
try this
You need to stop the validation with the help of attribute CausesValidation="false"
<asp:Button ID="BtnLogOut" runat="server" Text="Logout" CausesValidation="false" />
CausesValidation
Upvotes: 2