Ryan
Ryan

Reputation: 18119

Asp.Net Modal "OK" is triggering validation... How can I stop that?

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!

Upvotes: 1

Views: 564

Answers (3)

Ryan
Ryan

Reputation: 18119

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.

Upvotes: -1

Jeffrey Hines
Jeffrey Hines

Reputation: 1772

CausesValidaton="false"

Upvotes: 1

bytebender
bytebender

Reputation: 7491

Is CausesValidation set to false?

Upvotes: 1

Related Questions