title: Code blocks are not supported in this context.When Binding Html Table With dataset
body: <p>In the below code i have html datatable and dataset .i want to bind the dataset to html table.And my datarow count is 25  and it throws error "Code blocks are not supported in this context.".Pls help me to rectify the issue.</p>
  
  <pre><code> public string getWhileLoopData()
  {
   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;
                      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;
  }
  
  
  
  
  
  &lt;table id="dataTable" width="350px" border="1" runat="server"&gt;
          &lt;tr &lt;%Response.Write(getWhileLoopData())%&gt;&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>