requiredfieldvalidator problem

Posted by Suneel161 under Regular Expressions on 3/15/2010 | Views : 1751 | Status : [Member] | Replies : 2
hii

in my form we have 2 textboxes (for textboxes given requiredfield validator),2 buttons(submit,view). when we click submit button, fields will be created..when we click view button it should show all the required fields. how to solve this query...




Responses

Posted by: Abhi2434 on: 3/15/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Use
CausesValidation="False"

for the button for which you dont want RequiredFieldValidator to invoke its validation.

<asp:Button runat="server" CausesValidation="False" />


something like this.

www.abhisheksur.com

Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SurajRane on: 3/16/2010 [Member] Starter

Up
0
Down
Abhi2434 is right.

set CauseValidation="false" for Submit button

CauseValidation is property of button. it indicate wether validations should be performed when button is clicked.

by defult it is true.

hence, set it to false for buttons for which you dont want validations to be fired.



Suneel161, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response