Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

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

HTML
<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="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/redmond/jquery-ui.css" rel="Stylesheet" type="text/css"   />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></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
Comments
ZurdoDev 13-Nov-12 14:38pm    
What's the exact error?

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900