title: To bind Values to Html Table
body: <p>In the below code i have a html table  with text box and dropdown list and i want to bind values from datset to html table.But it binds only 1 row but it has 15 records.Pls help me to do this.</p>
  
  <p><strong>Asp.net Code :-</strong></p>
  
  <pre><code> public string getWhileLoopData()
          {
              GetProduct();
              string htmlStr = "";
              MastersClient objIndent = new MastersClient();
              DataSet ds = objIndent.GetIndent(hidIndentID.Value);
  
              DataRow[] drIndentID = ds.Tables[0].Select("IndentID =" + hidIndentID.Value);
  
              for (int i = 0; i &lt; ds.Tables[0].Rows.Count; i++)
              {
                  txtQty.Value = drIndentID[i]["RecommentedQuantity"].ToString();
                  string Qty = txtQty.Value;
                  string strProductID = drIndentID[i]["ProductID"].ToString();
                  ddlProduct.Text = strProductID;
                  txtDate.Text = drIndentID[i]["ProductRequiredDate"].ToString();
                  string date = txtDate.Text;
                 Response.Write( htmlStr += "&lt;tr&gt;&lt;td&gt;" + Qty + "&lt;/td&gt;&lt;td&gt;" + strProductID + "&lt;/td&gt;&lt;td&gt;" + date + "&lt;/td&gt;&lt;/tr&gt;");
              }
  
  
              return htmlStr;
          }
  </code></pre>
  
  <p><strong>Html Table :-</strong></p>
  
  <pre><code>  &lt;table id="dataTable" width="350px" border="1" runat="server"&gt;
              &lt;tr &gt;
                  &lt;td&gt;&lt;input id="checkbox" type="checkbox" name="chk" runat="server"/&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" name="txt" id="txtQty" runat="server"/&gt;&lt;/td&gt;
                  &lt;td&gt;
                  &lt;asp:DropDownList ID="ddlProduct" runat="server"  Style="width: 100%; height:23px" &gt;&lt;/asp:DropDownList&gt;  
  
  
                  &lt;/td&gt;
                 &lt;td&gt;
                 &lt;asp:TextBox ID="txtDate" Style="text-align: left" onkeypress="return isNumberKey(event, false);"
                                                              onblur="DateValidation(this)" onkeyup="ValidateDate(this, event.keyCode)" onkeydown="return DateFormat(this, event.keyCode)"
                                                              Height="20px" runat="server" Width="80px"&gt; &lt;/asp:TextBox&gt;
  
  
                 &lt;/td&gt;
              &lt;/tr&gt;
  
          &lt;/table&gt;
  </code></pre>