I just started using MVC 2 and Ajax, and I am wondering if I am doing something wrong, because I had the impression that Ajax would make changes to the web page very quickly. The example I have is related to the Ajax ActionLink connection:
<div>
<%: Ajax.ActionLink("Dita", "AjaxView", new AjaxOptions { UpdateTargetId = "myDiv" })%>
</div>
<div id="myDiv">
Change this text</div>
And the method of action:
public ActionResult AjaxView(string id)
{
return Content("Text changed!"); ;
}
This is a fairly short simple text string, and yet it takes about 1-2 seconds before the text appears. Maybe ajax should not do what I thought, but I thought I could use it to instantly preview text and images, such as the rollover function (by the way, I was wondering if you can activate the actionlink to invoke the action method on hover , not a click?)
Is it normal that it is so slow or am I missing something?