Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Where to put Form tag

Reply
Thread Tools

Where to put Form tag

 
 
tshad
Guest
Posts: n/a
 
      07-30-2007
I have pages that are identical except for the middle of the page to the
right where I do all my work.

<html>
<head>
</head>
<body>
<table>
<tr>
<td>
<table>
<tr>
<td>
<form>
<asp:...>
<asp:...>
...
</form
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

This works fine.

But now I need to add an <asp:Label> and maybe an <asp:textbox> just below
the <body> tag.

Do I need to move the <form> to just after the <body> and the </form> to
just before the </body>?

There is a lot of objects such as images and flash that will now be inside
the forms tag.

Is this going to be a problem? Will it slow the page down doing this?

Thanks,

Tom


 
Reply With Quote
 
 
 
 
Peter Bucher [MVP]
Guest
Posts: n/a
 
      07-30-2007
Hi Tom

> Do I need to move the <form> to just after the <body> and the </form> to
> just before the </body>?

Yes, as the autogenerated Site looks like in Visual Studio.
The whole Event System with the serverside controls build on the form
and needs them around.

[...]
<body>
<form....>
[All other Content goes here]
</form>
</body>
[...]

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      07-30-2007
Yes, you should adjust the form tags as you specified.
It's ok that a lot of other stuff will be in the form tags. If these
elements are not marked as runat="server" then they will have no effect on
performance.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net


"tshad" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have pages that are identical except for the middle of the page to the
>right where I do all my work.
>
> <html>
> <head>
> </head>
> <body>
> <table>
> <tr>
> <td>
> <table>
> <tr>
> <td>
> <form>
> <asp:...>
> <asp:...>
> ...
> </form
> </td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> This works fine.
>
> But now I need to add an <asp:Label> and maybe an <asp:textbox> just below
> the <body> tag.
>
> Do I need to move the <form> to just after the <body> and the </form> to
> just before the </body>?
>
> There is a lot of objects such as images and flash that will now be inside
> the forms tag.
>
> Is this going to be a problem? Will it slow the page down doing this?
>
> Thanks,
>
> Tom
>


 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      07-30-2007
That was what I figured,

Thanks,

Tom
"Peter Bucher [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Tom
>
>> Do I need to move the <form> to just after the <body> and the </form> to
>> just before the </body>?

> Yes, as the autogenerated Site looks like in Visual Studio.
> The whole Event System with the serverside controls build on the form
> and needs them around.
>
> [...]
> <body>
> <form....>
> [All other Content goes here]
> </form>
> </body>
> [...]
>
> --
> Gruss, Peter Bucher
> Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
> http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
> http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET



 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      07-30-2007

"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Yes, you should adjust the form tags as you specified.
> It's ok that a lot of other stuff will be in the form tags. If these
> elements are not marked as runat="server" then they will have no effect on
> performance.
>


That makes sense.

I was always used to building my look and feel first and then started
putting my <form> tag around the area where my asp objects were which as
usually a cell in a table.

If there is no drawback that putting the form right after the body makes
more sense as it doesn't matter where on the page that I put some object
that may be outside of my normal work area.

Thanks,

Tom
> --
> I hope this helps,
> Steve C. Orr,
> MCSD, MVP, CSM, ASPInsider
> http://SteveOrr.net
>
>
> "tshad" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>I have pages that are identical except for the middle of the page to the
>>right where I do all my work.
>>
>> <html>
>> <head>
>> </head>
>> <body>
>> <table>
>> <tr>
>> <td>
>> <table>
>> <tr>
>> <td>
>> <form>
>> <asp:...>
>> <asp:...>
>> ...
>> </form
>> </td>
>> </tr>
>> </table>
>> </td>
>> </tr>
>> </table>
>> </body>
>> </html>
>>
>> This works fine.
>>
>> But now I need to add an <asp:Label> and maybe an <asp:textbox> just
>> below the <body> tag.
>>
>> Do I need to move the <form> to just after the <body> and the </form> to
>> just before the </body>?
>>
>> There is a lot of objects such as images and flash that will now be
>> inside the forms tag.
>>
>> Is this going to be a problem? Will it slow the page down doing this?
>>
>> Thanks,
>>
>> Tom
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error "A form tag with runat=server must exist" but there is a form tag!! André ASP .Net 2 06-23-2008 07:49 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
How Can I put XSL tag inside HTML form tag? RC Java 2 05-10-2005 06:26 PM
How Can I put XSL tag inside HTML form tag? RC XML 2 05-10-2005 05:55 PM
netscape 4.7: onmouseover not working when i put <a> tag within a div tag Eqbal Z Javascript 6 08-27-2003 12:56 AM



Advertisments