title: Specifying parameter type later and keeping the MVC naming convention
body: <p>I am in a situation where i want to define the parameter type inside the method. But if i do something like this:</p>
  
  <pre><code>    public class UserModel
      {
          public string InputName { get; set; }
      }
  
      [HttpPost]
      public ActionResult Index(object obj)
      {
          UserModel test = obj as UserModel;
          ViewBag.Test = test.InputName;
  
          return View();
      }
  </code></pre>
  
  <p>The naming convention, that there is supposed to be in my <code>obj</code> when posting a form, does not take place? I think.
  I wanna do this, because the <code>obj</code> type is located elsewhere.
  Can this be done somehow? Do I need to overwrite something?</p>
  
  <p>Edit: - Another way of addressing my problem.</p>
  
  <p>When you post a form in a MVC web application. You receive the data by declaring a parameter type in your ActionResult. And here a naming convention takes place right? But what if i don't know the parameter type right away? How can I declare the parameter type later inside the ActionResult method and get the naming convention to happen there?</p>
  
  <p>Hope it makes sense, and sorry for my English!</p>
  
  <hr>
  
  <p>Thank you for your suggestions! I found another way to approach my problem.
  And now i am stuck here instead :)</p>
  
  <p><a href="https://stackoverflow.com/questions/8606752/view-to-string-from-another-controller">View to String from another controller</a></p>