Hi
In my webform appear this message in the line 3:
Object reference not set to an instance of an object.
1 string id;
2 id = "f1c2";
3 if(id==(((TextBox)FindControl(id)).ID))
4 {
5 ((TextBox)FindControl(id)).Text = "OK";
6 }
7 else
8 {
9 Label1.Text = "Failed";
10 }
Where is the problem?? What's wrong??
Thanks
In my webform appear this message in the line 3:
Object reference not set to an instance of an object.
1 string id;
2 id = "f1c2";
3 if(id==(((TextBox)FindControl(id)).ID))
4 {
5 ((TextBox)FindControl(id)).Text = "OK";
6 }
7 else
8 {
9 Label1.Text = "Failed";
10 }
Where is the problem?? What's wrong??
Thanks