title: Problem with Html.RenderPartial -MVC
body: <p>I am trying to update a small area in my web page.I just want to reload the ascx page(without refreshing the entire page) when user clicks the button. The code sample is shown below.When loading its work fine. </p>
  
  <p>But after ajax request its not showing the loaded data(means name and address is changed). I can see in debugging the html with new data is constructing  for ascx page after ajax requset. But its not updating the view .</p>
  
  <p><strong>VIEW</strong></p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  &lt;script type="text/javascript" src="../../Scripts/MicrosoftAjax.js"&gt;&lt;/script&gt;
  &lt;script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;% using (Ajax.BeginForm("Index", "Home", 
                          new AjaxOptions {
  
                             HttpMethod="GET",
  
                            }))
  
     { %&gt;&lt;button type="submit" name="test"&gt;test button&lt;/button&gt;
  
       &lt;% } %&gt;
          &lt;% Html.RenderPartial("test"); %&gt;      
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>  public ActionResult Index()
      {
          Models.HomeModels obj = new Models.HomeModels();
          obj.name = "initial name";
          obj.address = "initial address";           
          if (Request.IsAjaxRequest())
          {
              obj.name="test";
              obj.address = "success";
              return PartialView("test",obj);
          }
          return View(obj);
      }
  </code></pre>
  
  <p><strong>Test.ascx</strong></p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;test_partial_renderning.Models.HomeModels&gt;" %&gt;
   &lt;% if(Model.address!=null)
   { %&gt;
    &lt;%= Html.Encode(Model.name) %&gt;&lt;br /&gt;
    &lt;%= Html.Encode(Model.address) %&gt;&lt;br /&gt;
   &lt;% } %&gt;
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>    public string name { get; set; }
      public string address { get; set; }
  </code></pre>