Click here to Skip to main content
11,577,710 members (62,021 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Ajax MVC superfish

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 3:02am
ryanb31 at 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
0 Peter Leow 180
1 Richard MacCutchan 175
2 DamithSL 150
3 OriginalGriff 135
4 Afzaal Ahmad Zeeshan 95
0 OriginalGriff 830
1 Sergey Alexandrovich Kryukov 701
2 Abhinav S 573
3 F-ES Sitecore 420
4 Dave Kreskowiak 374

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2015
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