title: When i set value of TextBoxFor programmaticaly, it is posted to controller as null
body: <p>I set value of TextBoxFor in javascript before form window open. If user edit textbox value, it is posted to controller correctly. But if user doesn't edit textbox, before setted value  posted to controller as null. </p>
  
  <p>Isn't there anybody who has same problem? I m trying to fix this for days but couldn't. Please help someone</p>
  
  <p><strong>Here is the problem textbox</strong></p>
  
  <pre><code> @(Html.TextBoxFor(x=&gt;x.KontenjanSayisi,"KontenjanSayisi",new { style = "width: 200px"}))
  </code></pre>
  
  <p><strong>Here is my grid DataSource. Problem at create function <em>GridDonemKursSinifi</em></strong></p>
  
  <pre><code>.DataSource(dataSource =&gt; dataSource
          .Ajax()
          .Read(read =&gt; read.Action("GridDonemKursSinifi", "Tanim").Data("data"))
          .Create(create =&gt; create.Action("DonemKursSinifiOlustur", "Tanim").Data("dataCreate"))
          .Update(update =&gt; update.Action("DonemKursSinifiGuncelle", "Tanim"))
          .Destroy(destroy =&gt; destroy.Action("DonemKursSinifiSil", "Tanim"))
          .PageSize(20)
          .Model(model =&gt; model.Id(p =&gt; p.Id))
       )
  </code></pre>
  
  <p><strong>Here is my script function which set the value of textboxfor. value of kontenjan is correct i looked. No problem at kontenjan value</strong></p>
  
  <pre><code> $("#KontenjanSayisi").val(kontenjan);
  </code></pre>
  
  <p><strong>Here is my controller function, KontenjanSayisi is posted null if not modified</strong></p>
  
  <pre><code> public JsonResult DonemKursSinifiOlustur([DataSourceRequest] DataSourceRequest request, string KontenjanSayisi)
      {//function}
  </code></pre>
  
  <p>By the way i don't want to write all of code, because of thinking question will be hard to understand. If you need something you can ask i can edit  </p>
  
  <p>Thanks </p>