Hi WebGurus,
I am converting the following code present in webform (DemoView.aspx) to razor view (DemoView.cshtml)
Code: <script type="text/javascript">
$(function () {
$("#listDetails").click(function () { location.href = "<%= Model.ListDetailsUrl %>"; });
$("#provideDetails").validate({
rules: {
<% bool isFirst=true; foreach (var q in Model.Details) { if (!isFirst) { %>,<% }; isFirst=false; %>
"answer-<%= q.SequenceNumber %>": {
required: true
<% if (q.ValueType == Demo.ValueType.Int) { %>,digits: true<% } %>
<% if (q.ValueType == Demo.ValueType.Decimal) { %>,number: true<% } %>
}
<% } %>
}
});
});
</script>
But I am getting errors while conversion.
Can any one help me in resolving the issue?
Thanks & Regards,
Santosh Kumar Patro
santosh kumar patro