title: unable to render partial view in asp.net mvc using ajax?
body: <p>Problem is : I do have <strong>Index.cshtml</strong> as</p>
  
  <pre><code>@{
      ViewBag.Title = "Search";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  &lt;script src="@Url.Content("../../Scripts/jquery.unobtrusive-ajax.min.js") type="text/javascript"&gt;&lt;/script&gt;
  &lt;h2&gt;Answer's are &lt;/h2&gt;
  
  &lt;div id="result"&gt;
  @Ajax.ActionLink("Search Wiki",
                    "WikiAns",
                  new AjaxOptions{
                      UpdateTargetId = "result",
                  InsertionMode=InsertionMode.Replace,
                  HttpMethod="GET",
                  LoadingElementId="progress"
                  })
  
  &lt;/div&gt;
  &lt;div id="progress" style="display: none"&gt;
  &lt;img src="@Url.Content("../../Content/Images/ajax-loader.gif")" alt="loader" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now i do have partial view model <strong>_WikiAns</strong>:</p>
  
  <pre><code>@model IEnumerable&lt;Questions.Models.WikiAnsClass&gt;
  
      &lt;h2&gt;Our Links&lt;/h2&gt;
      &lt;table&gt;
      @foreach (var item in Model) {
          &lt;tr&gt;
              &lt;td&gt;
              &lt;a href="@item.url" target="_blank"&gt;@item.content&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      }
      &lt;/table&gt;
  </code></pre>
  
  <p>Now using above i want is that...on clicking <strong>Search Wiki</strong> action link, id="result" get all partial view rendered in it. But its not happening. Instead of its going to a page "<code>localhost:80/Search/WikiAns</code>" and showing the result there. but i want to it to stay at <code>localhost:80/Search</code> and replace its "result" id. but its not working this way.</p>
  
  <p>Here is my action called <code>WikiAns</code></p>
  
  <pre><code>public ActionResult WikiAns()
  {
   //Code to follow...
   var wikians = //code to follow
    return PartialView("_wikiAns", wikians); 
   }
  </code></pre>
  
  <p>What's the problem ?</p>
  
  <p>Also how can i implement this Ajax GIF loader...i mean showing it while action gets executed. ?</p>
  
  <p>Please suggest</p>
  
  <p>Thanks</p>