asp.net mvc 4 - MVC Validations not working when deployed on IIS -
i have deployed mvc project on iis not single validation working there while validations working fine @ localhost.it shows error .live()
not method, googled , replaced .live()
.on()
error not showing validations still not working @ all. please guide me tackle issue. following sample view code
<li> @html.labelfor(m => m.accountname) @*@html.dropdownlistfor(x => x.accountid, (viewbag.accountslist) ienumerable<selectlistitem>, new { @class = "", @style = "width:312px; height:31px;" })*@ @html.dropdownlistfor(m => m.accountid, (viewbag.accountslist) ienumerable<selectlistitem>, new { @id = "accountname", @class = "chosen-select", @style = "width:312px; height:31px; float: right;" }) @html.validationmessagefor(m => m.accountid) </li> <li> @html.labelfor(m => m.contactname) @html.textboxfor(m => m.contactname) @html.validationmessagefor(m => m.contactname) </li>
and following code of model
[required(errormessage = "*")] [display(name = "account name")] public string accountname { get; set; } [required(errormessage = "*")] [display(name = "contact name")] public string contactname { get; set; }
you have stated have changed .live()
.on()
suggesting using outdated scripts because .live()
depreciated in jquery v1.7 , removed in v1.9. need update scripts associated unobtrusive client side validation - jquery{version}.js, jquery.validate.js , jquery.validate.unobtrusive.js current versions.
Comments
Post a Comment