hello sir I need to know how to change name name attibute to manually set name of textbox inside gridview.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label head = (Label)e.Row.FindControl("ltpl_head_name1");
TextBox amount = (TextBox)e.Row.FindControl("ltpl_amount");
TextBox remark = (TextBox)e.Row.FindControl("ltpl_remark");
TextBox ltpl_head_type = (TextBox)e.Row.FindControl("ltpl_head_type");
TextBox ltpl_headid = (TextBox)e.Row.FindControl("ltpl_headid");
TextBox ltpl_total = (TextBox)e.Row.FindControl("ltpl_total");
if (ltpl_head_type.Text == "AMOUNT")
{
amount.Attributes.Add("onBlur", "Calc_TotalParent();");
//amount.Attributes.Add("name", "MR_AMOUNT_" + ltpl_headid.Text);
}
if (ltpl_head_type.Text == "TOTAL")
{
amount.Attributes.Add("onChange", "Calc_GTotalParent('" + ltpl_total.Text + "','" + ltpl_headid.Text + "');");
//amount.Attributes.Add("name", "MR_AMOUNT_" + ltpl_headid.Text);
}