dropdownlist in datagrid giving prob
-
public void aa(object sender,System.EventArgs e) { DropDownList dl=(DropDownList)sender; ss=dl.SelectedValue.ToString();----->this is working fine TextBox tb=(TextBox)DataGrid1.FindControl("TextBox1"); tb.Text=ss;------->this is giving error } Object reference not set to an instance of an object.
Pradeep Reddy
-
public void aa(object sender,System.EventArgs e) { DropDownList dl=(DropDownList)sender; ss=dl.SelectedValue.ToString();----->this is working fine TextBox tb=(TextBox)DataGrid1.FindControl("TextBox1"); tb.Text=ss;------->this is giving error } Object reference not set to an instance of an object.
Pradeep Reddy
This error is coming because its unable to find control "TextBox1". Recheck it again and give the proper ID of the textbox to find it.
Regards, Amit Kumar HDISM, PGDCA, MCP, MCAD, MCSD amit_chikara2002@hotmail.com
-
This error is coming because its unable to find control "TextBox1". Recheck it again and give the proper ID of the textbox to find it.
Regards, Amit Kumar HDISM, PGDCA, MCP, MCAD, MCSD amit_chikara2002@hotmail.com
TextBox tb1,tb2; DropDownList dl1,dl2; dl1=(DropDownList)sender; string ss=dl1.SelectedValue.ToString(); tb1=(TextBox)DataGrid1.Items[0](i was missing this).FindControl("TextBox3"); tb1.Text=ss; thank u i got the solution
Pradeep Reddy