C
Chris
Hi,
i have in an content page a fieldset containing a label, an iframe and a
textarea:
<asp:Content ID="Content1" ContentPlaceHolderID="main" Runat="Server">
<fieldset style="width:650px;">
<asp:Label ID="Label1" runat="server"></asp:Label>
<iframe ..... ></iframe>
<textarea id="txta" rows="6"></textarea>
</fieldset>
</asp:Content>
What i'm trying to do is to give the focus to the textarea.
I did this in code-behind:
Dim ta As HtmlTextArea
Dim mp As Content
mp = FindControl("Content1")
ta = mp.FindControl("txta")
ta.Focus()
but this gives the error: "Object reference not set to an instance of an
object. "
for line ta = mp.FindControl("txta")
How can i reference the textarea?
Thanks
Chris
i have in an content page a fieldset containing a label, an iframe and a
textarea:
<asp:Content ID="Content1" ContentPlaceHolderID="main" Runat="Server">
<fieldset style="width:650px;">
<asp:Label ID="Label1" runat="server"></asp:Label>
<iframe ..... ></iframe>
<textarea id="txta" rows="6"></textarea>
</fieldset>
</asp:Content>
What i'm trying to do is to give the focus to the textarea.
I did this in code-behind:
Dim ta As HtmlTextArea
Dim mp As Content
mp = FindControl("Content1")
ta = mp.FindControl("txta")
ta.Focus()
but this gives the error: "Object reference not set to an instance of an
object. "
for line ta = mp.FindControl("txta")
How can i reference the textarea?
Thanks
Chris