I got a content place holder, in this holder, I have a grid view. Inside this grid view, I will have multiple textbox added at runtime.
From the source code, I found that one of the textbox's id is as "ctl00_CPHDetail_gvDetail_ctl02_txt_Text1", CPHDetail is the content place holder, and gvDetail is the grid view.
What I wanted to do is to find the text box control and retrieve its value.
So far, this is what I have done, and it was able to return the correct info up to the grid view. It can never find the text box control.
I wonder will it caused by the ct102 between "ctl00_CPHDetail_gvDetail_ctl02_txt_Text1"
ContentPlaceHolder myContent = (ContentPlaceHolder)Page.Master.FindControl("CPHDetail");
GridView gvView = (GridView)myContent.FindControl("gvDetail");
TextBox tb = (TextBox)gvView.FindControl("txt_Text1");
View Complete Post