title: Basic Problem with Asp.net MVC UpdateModel(myClass)
body: <p>In my Controller in a Asp.net MVC 1 app I want to use UpdateModel to populate a variable with POST data in my controller.  I've looked at dozens of examples but even the most basic ones seem to fail silently for me.  </p>
  
  <p>Here's a very basic example that's just not working.
  What am I doing wrong?</p>
  
  <pre><code>    public class TestInfo
      {
          public string username;
          public string email;
      }
  
     public class AdminController : Controller
      {
  
          public ActionResult TestSubmit()
          {
              var test = new TestInfo();
              UpdateModel(test);//all the properties are still null after this executes  
              //TryUpdateModel(test); //this returns true but fields / properties all null
              return Json(test);
          }
  
  
      }
  
  
  //Form Code that generates the POST data
      &lt;form action="/Admin/TestSubmit" method="post"&gt;
          &lt;div&gt;
              &lt;fieldset&gt;
                  &lt;legend&gt;Account Information&lt;/legend&gt;
                  &lt;p&gt;
                      &lt;label for="username"&gt;Username:&lt;/label&gt;
                      &lt;input id="username" name="username" type="text" value="" /&gt;
                  &lt;/p&gt;
                  &lt;p&gt;
                      &lt;label for="email"&gt;Email:&lt;/label&gt;
                      &lt;input id="email" name="email" type="text" value="" /&gt;
                  &lt;/p&gt;
                  &lt;p&gt;
                      &lt;input type="submit" value="Login" /&gt;
                  &lt;/p&gt;
  
              &lt;/fieldset&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>