title: get hidden field in C#, created by javascript
body: <p>I have a javascript that can create hidden filed in my form dynamically, also generation of the hidden fields are variable it can be 200 and 1000 also. I want those value in my C# code using loop. I have tried below code but it give me only the first value static, but I need values in loop so that I can access all the values and store in my SQL database</p>
  
  <pre><code>string valueOfTheHiddenField = this.Request.Form.Get("0");
  </code></pre>
  
  <p>Example this type of code needed</p>
  
  <pre><code>for each
  {
      string HiddenFieldvalue = this.Request.Form.Get("0");
      insert into sql = value Of The HiddenField
  }
  </code></pre>
  
  <p>Below is the sample code i am using</p>
  
  <pre><code>var form = document.forms['form1'];
  for (var i = 0; i &lt; 150; i++) {
      var el = document.createElement("input");
      el.type = "hidden";
      el.name = "myHiddenField";
      el.value = trial2;
      el.id = i;
      form.appendChild(el);
  }
  </code></pre>
  
  <p>These hidden fields are generated</p>
  
  <pre><code>&lt;input id="0" type="hidden" name="myHiddenField" value=" Root Canal Treatment "&gt;
  &lt;input id="1" type="hidden" name="myHiddenField" value=" Cosmetic Dentistry "&gt;
  &lt;input id="2" type="hidden" name="myHiddenField" value=" Fillings "&gt;
  &lt;input id="3" type="hidden" name="myHiddenField" value=" Apicectomy "&gt;
  &lt;input id="4" type="hidden" name="myHiddenField" value=" Aesthetic Crown And Bridges "&gt;
  &lt;input id="5" type="hidden" name="myHiddenField" value=" Bleaching "&gt; 
  </code></pre>