I've mostly worked in MVC1. I'm now working with some MVC2 code. I have fields with Strongly Typed Html Helpers like:
<div class="editor-field">
<%: Html.TextBoxFor(model => model.Contract.client_name)%>
<%: Html.ValidationMessageFor(model => model.Contract.client_name) %>
</div>
How do I access this field in jquery? I previously would have:
$('#client_name').val();
or in jquery .validate:
$('form').validate({
rules: {
client_name: "required"
},
messages: {
client_name: "Client Name is required"
}
});