How to Cancel Validation for a <A> tag with OnClick Event.

  • Thread starter Thread starter RSB
  • Start date Start date
R

RSB

I have Few <A href> tags with onclick javascript fuction. and in that
javascript fuction i am using
window.document.form1.submit(); to submit the page.
Now this submit does a Validation before i submit the page and i want to
ignore it.

and as i am using <A> tags as button so there is no Causevalidation property
which i can set to false.
Please help me to achive this.
Thanks.
RSB
 
RSB said:
I have Few <A href> tags with onclick javascript fuction. and in that
javascript fuction i am using
window.document.form1.submit(); to submit the page.
Now this submit does a Validation before i submit the page and i want to
ignore it.

and as i am using <A> tags as button so there is no Causevalidation property
which i can set to false.
Please help me to achive this.

Is there any reason you can't use a LinkButton and simply set its
CausesValidation to False?

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
Back
Top