title: How to generate and post html table Grid data to mvc controller as array
body: <p>If I input data to the table I want to get the data as array in mvc controller.
  I want to pass input values of each row and column to controller as an array.
  so i can perform various operations on array  </p>
  
  <pre><code>function createTable()
  {
      document.getElementById('tb_container').innerHTML = "";
      var rows = document.getElementById('tb_rows').value;
      var cols = document.getElementById('tb_cols').value;
  
      tblHtml = '&lt;table&gt;'
      for (i = 0; i &lt; rows; i += 1)
      {
          tblHtml += '&lt;tr&gt;';
          for (j = 0; j &lt; cols; j += 1)
          {
              tblHtml += '&lt;td&gt;&lt;input type="text"&gt;&lt;/td&gt;';
          }
          tblHtml += '&lt;/tr&gt;';
      }
      tblHtml += '&lt;/table&gt;';
      document.getElementById('tb_container').innerHTML = tblHtml;
  }
  
  
  
  td {
      min-width: 100px;
      min-height: 20px;
      border: solid 1px #000;
  }
  
  
  
  
  &lt;ul&gt;
      &lt;li&gt;
          Rows:
          &lt;input type="text" id="tb_rows"&gt;
      &lt;/li&gt;
      &lt;li&gt;
          Columns :
          &lt;input type="text" id="tb_cols"&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;input type="button" value="Create Table" onclick="createTable()"&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;div id="tb_container"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>please suggest me how should i pass the input data (i.e values in rows and columns) from user as array.</p>