I have 3 text box on web page for which I have used Required Field Validator controll.
On same page i also have logout button.
If i click logout button. bege does not subitt because of the validation controls.
Please help me how should I submitt the page without filling the text boxes?
validation control events firinglog out
-
kdes1983
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question
kdes1983
Member
27 Points
48 Posts
Validation control problem
Dec 29, 2009 02:33 PM|LINK
I have 3 text box on web page for which I have used Required Field Validator controll.
On same page i also have logout button.
If i click logout button. bege does not subitt because of the validation controls.
Please help me how should I submitt the page without filling the text boxes?
validation control events firing log out
kdes1983
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question
e36M3
Member
57 Points
33 Posts
Re: Validation control problem
Dec 29, 2009 03:06 PM|LINK
Set RequiresValidation to false on the button.
irokhes
Star
9920 Points
1333 Posts
Re: Validation control problem
Dec 29, 2009 03:11 PM|LINK
Hi,
you can write CauseValidation property to false in button which you want sutbmit without validation.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.causesvalidation.aspx
good luck
mY BlOg
KyD
Participant
1626 Points
437 Posts
Re: Validation control problem
Dec 29, 2009 03:58 PM|LINK
by default buttons are set to validate.
chkboxMarkAsAnswer.checked = TRUE
END IF
KyD
jitendramcu
Contributor
2782 Points
459 Posts
Re: Validation control problem
Dec 29, 2009 04:55 PM|LINK
use this
CausesValidation="False" for logout button
or
you can set the ValidationGroup="required" in Required Field Validator for the 3 textbox and ValidationGroup="logout" for button control.
means use different ValidationGroup for textbox(same for 3 Textbox) and button control,validation fire on validationGroup.
-----------------------------------------------
Jitendra Kr.
http://jitendra-aspnet.blogspot.com/