I add a GridView to a web page, then edit columns ...
select a field and then convert field to TemplateField
after that, I customize the field. In the EditItemTemplate I got a TextBox1 by default.
I add some code to GridView1_RowCreated method
TextBox textBox = (TextBox)e.Row.FindControl("TextBox1");
string clientID = textBox.ClientID;
here clientID is "TextBox1"
but it is not the id from the IE's view source ...
I try to add some javascript to control the textbox's content, but can't get the correct clientid.
Anyone can help
Thanks

Question about GridView
MagicDust
MonicaR
I know what you mean.
the following code
TextBox textBox = (TextBox)e.Row.FindControl("TextBox1");
string clientID = textBox.ClientID;
the clientID should be "base ID" + counter.
But it didn't.
It just return "TextBox1" that is not correct.
MikeC06
Khawar
But the question is that .... I didn't get the correct client id ...
as I mentioned, the ClientID property is not the same with the browser's view source's textbox id.