0

I am using

<script src="../../Scripts/MicrosoftAjax.js"></script>
<script src="../../Scripts/MicrosoftMvcAjax.js"></script>
<script src="../../Scripts/jquery-1.8.3.js"></script>

but following library MicrosoftAjax and MicrosoftMvcAjax is obsolete and and size is also additional is there any alternative..

i heard about unobtrusive ajax but i don't know how to use it..

my form is like

using (Ajax.BeginForm("getConversionRate", new AjaxOptions { UpdateTargetId = "Result", OnSuccess = "onSuccess", OnBegin = "onBegin", OnComplete = "onComplete" }))
Nisar
  • 5,708
  • 17
  • 68
  • 83
  • Probably the answer to this question is helpful: [Are MicrosoftAjax.js, MicrosoftMvcAjax.js \[...\] obsolete as of ASP.NET MVC 3?](http://stackoverflow.com/q/8782697/1960455) – t.niese Apr 02 '14 at 08:52

1 Answers1

1

First set scripts src like this:

<script src="@Url.Content("~/Scripts/MicrosoftAjax.js")"></script>

Secondly include theses files to make ajax forms work in mvc:

<script src="@Url.Content("~/Scripts/jquery-1.9.1.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160