Using ScriptManager in a razor?

There should be a simple question, but I can’t understand for life how to enable the script manager in my opinion. <asp:ScriptManager />does not work. Somebody knows?

+5
source share
2 answers

ScriptManager is a webform-specific design, so if you use MVC, you cannot (and should not) use it. You can look at http://mvcscriptmanager.codeplex.com/ if you want something that brings some of the scriptmanager functions to MVC.

+14
source

, . "-ish" WCF Ajax , :

<script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
<script type="text/javascript" src="@Url.Content("~/Services/SampleService.svc/jsdebug")"></script>

-:

var dataService = new SampleService();
dataService.doBar(fooCallback,fooErrorMethod,null);

, , "kludge" .

+2

All Articles