System.Web.UI.Page and finding the <body>

  • Thread starter Thread starter sloan
  • Start date Start date
S

sloan

If my html looks like this (page1.aspx)

<HTML>
<HEAD>
<title>WebForm1</title>

</HEAD>
<body>
<form id="Form1" method="post" runat="server">

<asp:TextBox id="TextBox3" runat="server"></asp:TextBox>correct
email</P>

</form>
</body>
</HTML>


In the codebehind., I have the "System.Web.UI.Page" object as my disposal.

Is there a way to get hold of the <body> tag in the code behind.
What I'm getting at is a function like below.


private void Test( System.Web.UI.Page p )
{
//find the body ??
}

Or is there another way?

...
 
If you give your Page's BODY tag a runat=server attribute, it will act like
any other server control. Of course, the actual goal here, which you haven't
stated, may mean you really need to be doing something different.
Peter
 
Back
Top