Super Simple Ajax.ActionLink Example Doesn’t Work In IE… But

I have the following controller:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc; namespace MvcApplication1.Controllers public class TestController : Controller public ActionResult Test() return View(); public string AjaxTest() return “Some random text”; }}I have the following View:<%@ Page Language=”C#” Inherits=”System.Web.Mvc.ViewPage” %> …

via Asp.Net Developed Tutorials » Search Results » ajax:

Super Simple Ajax.ActionLink Example Doesn’t Work In IE… But

I have the following controller:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1.Controllers

public class TestController : Controller

public ActionResult Test()

return View();

public string AjaxTest()

return “Some random text”;

}
}I have the following View:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>




<%= Ajax.ActionLink("Ajax Test", "AjaxTest", new AjaxOptionsUpdateTargetId="testtarget" ) %>

Test Div


When I click the action link in IE the controller code runs but the div is NOT updated. Do it in ANY other browser and it works just fine. Is this (yet another) known problem/bug with IE?? Or am I doing something wrong?
……………………………………..

if u are using MVC3, check this out, I had the same problem and working now after I followed the suggestion below, but I found that the Ajax ActionLink is caching the requests, but that is a different issue
Ajax.ActionLink not working, Response.IsAjaxRequest() is always false
……………………………………..

I know this question was posted ’bout two years ago, but I figured I might be able to help somebody with this.
IE caches your “favorite” pages (obviously for performance reasons), but it doesn’t delete them by default when you clear your browser history.
You need to go to internet options, click Delete (under history), and UNCHECK Preserve favorite website data.
I had the same problem with a regular ASP.Net website, where when I pressed ‘Back’ or refreshed the page, IE would fetch an older version of my website..
Anyways, hope this helps!
……………………………………..

You should add doctype:
Without it, you can have some problems, but still it works for me with it and without. Maybe there is some kind of caching problem? Ctrl + F5 and try again.

For more info: Super Simple Ajax.ActionLink Example Doesn’t Work In IE… But

Asp.Net Developed Tutorials » Search Results » ajax

Super Simple Ajax.ActionLink Example Doesn’t Work In IE… But

Share this post:

Related Posts

Leave a Comment