views:

312

answers:

3

I have a pop-up modal that is displayed as soon as anyone visits a page (on page load). The modal is an agreement they must accept to continue. The problem is, when they click accept, it triggers all the client side validation, displaying all the error messages. I obviously don't want this to happen as the user hasn't even gotten a chance to view the page yet much less fill out the form. How can I stop the validation from being triggered? I have already set the modal ok/agree button's UseSubmitBehavior=false to no avail.

Thanks!

+1  A: 

Is CausesValidation set to false?

J.13.L
thanks, brainfarted on that one. Now its posting back the page even though useSubmitBehavior is set to false. How can I stop it from posting back to the page? Thanks again.
Ryan
+1  A: 

CausesValidaton="false"

Jeffrey Hines
thanks, brainfarted on that one. Now its posting back the page even though useSubmitBehavior is set to false. How can I stop it from posting back to the page? Thanks again.
Ryan
Do you have it in an update panel?
Jeffrey Hines
No, its not in an update panel, and there are no update panels on the page.
Ryan
Without an updatepanel or some sort of javascript/ajax/jquery it will cause a postback.
Jeffrey Hines
A: 

For some odd reason when UseSubmitBehavior=false was used, it submitted, but when UseSubmitBehavior was obmitted and causesValidation was false, it did not submit.... strange.

Ryan