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

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?

...
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top