Reputation: 86
Hi i have an issue with my Required field validator. I have two text boxes in the page which have requiredfieldvalidator on it. I also have a button on my page which will take the user back to previous page. When i land into this page and click on the back button it shows the requiredfieldvalidator issue on the text boxes.So to go back to the previous page i have to enter some value on the text boxes which is not much user friendly. Am i supposed to use some-other validator? Appreciate your help .
Upvotes: 1
Views: 37
Reputation: 86
When we set a RequiredFieldValidator it is appplicable for the whole section not just the textbox or something. I need to escape from the validation and.
[Description][1] https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.causesvalidation.aspx
use CausesValidation="false" to the button and the button will be able to escape the validation.
Upvotes: 1