title: how to add row in temporary table data table in asp.net
body: <pre><code>protected void Add_New_Click(object sender, System.EventArgs e)
          {
  
  
  
              DataTable dt= new DataTable();
  
              DataRow dr;
              dr = dt.NewRow();
  
  
              string CustomerID = ((TextBox)GridView1.FooterRow.FindControl("txtCustomerID")).Text;
              string CustomerName = ((TextBox)GridView1.FooterRow.FindControl("txtCustomerName")).Text;
              string CustomerFatherName = ((TextBox)GridView1.FooterRow.FindControl("txtCustomerFatherName")).Text;
              dt.Rows.Add(dr);
              GridView1.DataSource = dt;
              GridView1.DataBind();
              ViewState["sajjad_Viewstate"] = dt;
  
  
          }
  </code></pre>