jqueryajaxasp.net-mvc-3asp.net-ajaxasp.net-mvc-ajax

"Microsoft JScript runtime error: 'Sys' is undefined" on Jquery dialog that renders "Log on partialview"


I am new in jquery, ajax and mvc.

I used Jquery dialog to show a log on partial view. when it is loaded and I click in its textbox or any other place on it, I get this error:

"Microsoft JScript runtime error: 'Sys' is undefined"

and show this script dynamic code for it:

function onclick(event) { Sys.Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event)); }

I can't use these scripts for validate textboxes, because I have jquery accordion in my page and when I use these scripts, accordion doesn't work. Also above error shows again.

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>

What should I do to solve it? How can I validate username and pass textboxes on dialog? and .. Can I use @Html.ActionLink in @Ajax.beginform(){}?


Solution

  • try this add refrence on layout:-

    <script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script>