title: Using ajax ActionLink in place of Html.ActionLink MVC
body: <p>All,</p>
  
  <p>I have an Html.Actionlink that calls a method in my controller and should return a partial view. My partial view is displayed within Index.cshtml, the partial view is _ServerStatusList.cshmtl.</p>
  
  <p>View</p>
  
  <pre><code>@using (Html.BeginForm())
  {
      @Html.ActionLink("Start", 
                       "StartServer", 
                        null,
                        new { @class = "startButton" })
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>[HttpGet]
          public PartialViewResult StartServer(Model model)
          {
              model.StartServer("server01");
              return PartialView("~/Views/Home/_ServerStatusList.cshtml", model.Servers);
          }
  </code></pre>
  
  <p>Right now upon clicking the start button all of the functionality works correctly as far as starting the server goes, but it returns the incorrect view. After clicking I get redirected to localHost/home/StartServer and it says "running" (as a started server should say in my server list) on a blank page. Then if I manually navigate to my server status page via the address bar it shows the server is running (as it should say) in my _ServerStatusList.cshtml.</p>
  
  <p>I used an Ajax ActionLink in another part of my project to click a button and return a partial view. I tried it for this button too using this code.</p>
  
  <pre><code> &lt;input id="StartButton" type="image" value="submit" src="~/Images/start.png" alt="Start" height="25" /&gt;
  @Ajax.ActionLink("Start", "StartServer",
                  new AjaxOptions
                  {
                      HttpMethod = "GET",
                      InsertionMode = InsertionMode.Replace,
                      UpdateTargetId = "CurrentView"
                  }
              )
  </code></pre>
  
  <p>Clicking the button does not work but clicking on the word "start" does something similar to the Html.ActionLink. If I click the Start link it takes me to Index.cshtml, displays running in the area where the partial view should be, but does not load _ServersStatusList.cshtml. Again upon manual redirection everything is as it should be, running and correctly formatted.</p>
  
  <p>How can I have the Ajax ActionLink use the image as the button, and upon clicking the image, return the correct partial view?</p>
  
  <p>Thanks</p>