[jQuery] Using jQuery Validation with Dot Net
I'm having issues getting the validation plugin (http://bassistance.de/
jquery-plugins/jquery-plugin-validation/) to work with dot net.
Whatever i try i can't stop the form from submitting. I've tried
several things i've found on this group and the web. Can anyone help
me getting this to work?
Here's my html.
<span id="ctl00_Control_LeftColumn_CF_Contact" class="ContactForm">
<p class="SuccessMessage">Submitted
<span class="Field">
<span class="Label">Name </span>
<span class="Validation">
<span id="ctl00_Control_LeftColumn_CF_Contact_ctl01_ctl04"
style="display: none;"/>
</span>
<input id="ctl00_Control_LeftColumn_CF_Contact_ctl01_TB_TextBox"
class="TextBox Name" type="text" name="ctl00$Control_LeftColumn
$CF_Contact$ctl01$TB_TextBox"/>
</span>
<span class="Field">
</span>
<span class="Field">
</span>
<a id="ctl00_Control_LeftColumn_CF_Contact_LB_Submit" class="Submit"
href="javascript:__doPostBack('ctl00$Control_LeftColumn$CF_Contact
$LB_Submit','')" style="background-color: rgb(51, 51, 51);">Submit</a>
</span>
And here is my javascript:
$(document).ready(function(){
$("#aspnetForm").validate({
rules: {
ctl00$Control_LeftColumn$CF_Contact$ctl01$TB_TextBox:
"required",
ctl00$Control_LeftColumn$CF_Contact$ctl02$TB_TextBox: {
required: true,
email: true
},
ctl00$Control_LeftColumn$CF_Contact$ctl04$TB_TextBox:
"required"
}
});
});
As i say above, the form just submits regardless so i'm lost on a
solution!