title: How to pass value from textBox from GET to POST
body: <p>In my view I have:</p>
  
  <pre><code>@model DataAccess.AdeccoView
  
  @{
      ViewBag.Title = "Create";
  }
  
  &lt;h2&gt;Create&lt;/h2&gt;
  
  
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
  
      &lt;div class="form-horizontal"&gt;
          &lt;h4&gt;AdeccoView&lt;/h4&gt;
          &lt;hr /&gt;
          @Html.ValidationSummary(true, "", new { @class = "text-danger" })
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.EmployeeID, "EmployeeID", htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.DropDownList("EmployeeID", null, htmlAttributes: new { @class = "form-control" })
                  @Html.ValidationMessageFor(model =&gt; model.EmployeeID, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Client.ClientName, "ClientName", htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Client.ClientName, new { htmlAttributes = new { @class = "form-control" } })
                  @*@Html.EditorForModel(model =&gt; model.Client.ClientName, new { htmlAttributes = new { @class = "form-control" } }))*@
  
                  @Html.ValidationMessageFor(model =&gt; model.Client.ClientName, "upisi me!", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.Date, htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.EditorFor(model =&gt; model.Date, new { htmlAttributes = new { @class = "form-control" } })
                  @Html.ValidationMessageFor(model =&gt; model.Date, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.VisitTypeID, "VisitTypeID", htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.DropDownList("VisitTypeID", null, htmlAttributes: new { @class = "form-control" })
                  @Html.ValidationMessageFor(model =&gt; model.VisitTypeID, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.ResultTypeID, "ResultTypeID", htmlAttributes: new { @class = "control-label col-md-2" })
              &lt;div class="col-md-10"&gt;
                  @Html.DropDownList("ResultTypeID", null, htmlAttributes: new { @class = "form-control" })
                  @Html.ValidationMessageFor(model =&gt; model.ResultTypeID, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
                  &lt;input type="submit" value="Create" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  }
  
  &lt;div&gt;
      @Html.ActionLink("Back to List", "Index")
  &lt;/div&gt;
  
  @section Scripts {
      @Scripts.Render("~/bundles/jqueryval")
  }
  </code></pre>
  
  <p>For <code>EditorFor</code> helper, I want to pass through POST method in my controller <code>ClientName</code>.</p>
  
  <p>Firstly, in the GET method, I've tried to make a new <code>ViewBag</code> or to call through new instance.</p>
  
  <pre><code>public ActionResult Create()
  {
      ViewBag.Client = new SelectList(db.Client, "ClientName");//I've added this
      ViewBag.ClientID = new SelectList(db.Client, "ClientID", "ClientName");
      return View();
  }
  </code></pre>
  
  <p>Next, in my POST method I have:</p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  public ActionResult Create([Bind(Include = "ViewID,EmployeeID,Date,VisitTypeID,ResultTypeID,ClientName, ClientID")] AdeccoView adeccoView)
  {
      Client client = new Client();
      AdeccoView view = new AdeccoView();
      string a = view.Client.ClientName;//here is my code throw an error
  
      if (ModelState.IsValid)
      {
          db.AdeccoView.Add(adeccoView);
          db.SaveChanges();
          return RedirectToAction("Index");
      }
      ViewBag.Klijent = new SelectList(db.Client, "ClientName");
      ViewBag.ClientID = new SelectList(db.Client, "ClientID", "ClientName", adeccoView.ClientID);
      ViewBag.EmployeeID = new SelectList(db.Employee, "EmployeeD", "Name", adeccoView.EmployeeID);
      ViewBag.ResultTypeID = new SelectList(db.ResultType, "ResultTypeID", "ResultName", adeccoView.ResultTypeID);
      ViewBag.VisitTypeID = new SelectList(db.VisitType, "VisitTypeID", "VisitTypeName", adeccoView.VisitTypeID);
      return View(adeccoView);
  }
  </code></pre>
  
  <p>Maybe it is a difference will I put <code>EditorFor</code>, <code>EditorForModel</code> or <code>TextBox</code>? 
  Thanks.</p>
  
  <p>edit: with <code>TextBox</code> helper, I've managed to pass it through <code>Request.Form[]</code> in a post method, but css now is a tricky one. </p>