title: How to pass a value to controller on submit ? mvc with razor
body: <p>I created a model and i am trying to build something like when i click on submit button the values should be passed to controller which looks like </p>
  
  <pre><code>[HttpPost]
  // i am getting checked property but not phoneno to controller 
  public ActionResult Confirm(Entity s) 
  {
      return view();    
  }
  </code></pre>
  
  <p><strong>My View</strong></p>
  
  <pre><code>@model MvcApplication3.Models.Entity
  
  @using ( Html.BeginForm("Confirm", "Home", FormMethod.Post))
  {
     @Html.CheckBoxFor(m=&gt;m.checkedprop,
        new 
        { 
            @class = "myCheckBox", 
            phoneno= "1234"    //tried different ways none looks working for me 
        })
  
     &lt;input type="submit" id="ConfirmButton"   /&gt;
  }
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code> public class Entity
   {
      public bool checkedprop { get; set; }
      public int phoneno { get; set; }
   }
  </code></pre>