Click here to Skip to main content
12,759,316 members (33,586 online)
Rate this:
Please Sign up or sign in to vote.
See more: Ajax MVC

I'm learning MVC, and as part of it I created an MVC project.
Since I needed menus and sub-menus I searched the net and found the superfish css and javascripts, and added them.
Then I wanted to add an Ajax button, so I saw many example of @Ajax.ActionLink
In my project, out of some reason it doesn't recognize the @Ajax. It offers me to use it as "System.Web.Mvc.Ajax" but then it doesn't recognize the ActionLink method.

here are my references from the _Layout.cshtml

<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/superfish.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.2.6.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/hoverIntent.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/superfish.js")" type="text/javascript"></script>
    <link href="" rel="Stylesheet" type="text/css"   />
    <script type="text/javascript" src=""></script>
    <script type="text/javascript" src=""></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>" type="text/javascript"></script>  
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js") %>" type="text/javascript"></script>

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

What am I doing wrong?
Posted 13-Nov-12 4:02am
ryanb31 13-Nov-12 14:38pm
What's the exact error?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Don't use the Microsoft AJAX stuff. It sucks. Use jquery. It gives you a lot more control over what is generated and is in general more standard, and more flexible.

Your jquery version is way out of date.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100