HaloMan
09-26-2007, 01:38 PM
I'm trying to locate an HTML TextArea control from the Codebehind of my app.
The problem is im using a master page and thus finding it in the page hierarchy is proving a bit of a problem.
I've tried:
target = CType(Master.FindControl("Content1").FindControl("TA1"), HtmlControls.HtmlTextArea)
Where Content1 is the name of the ContentPlaceholder and TA1 is the ID assigned to the Html textarea, but I just get a object reference error.
Ive tried Page.FindControl(), Page.Master.FindControl(), this.FindControl() and just findControl, but I just cannot seem to get hold of the damn textbox.
Can anyone assist in how I reference a plan html textarea from the codebehind. I have just the runat=server because im applying some client-side javascript which doesn’t function when I do that, so I need to find the client control from the code-behind;
Thanks
The problem is im using a master page and thus finding it in the page hierarchy is proving a bit of a problem.
I've tried:
target = CType(Master.FindControl("Content1").FindControl("TA1"), HtmlControls.HtmlTextArea)
Where Content1 is the name of the ContentPlaceholder and TA1 is the ID assigned to the Html textarea, but I just get a object reference error.
Ive tried Page.FindControl(), Page.Master.FindControl(), this.FindControl() and just findControl, but I just cannot seem to get hold of the damn textbox.
Can anyone assist in how I reference a plan html textarea from the codebehind. I have just the runat=server because im applying some client-side javascript which doesn’t function when I do that, so I need to find the client control from the code-behind;
Thanks