|
|
|
start date: Mon, 30 Jul 2007 11:48:44 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
tshad
|
|
2
Peter Bucher [MVP]
|
|
3
tshad
|
|
4
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
|
|
5
tshad
|
Where to put Form tag
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
Date:Mon, 30 Jul 2007 11:48:44 -0700
Author:
|
Re: Where to put Form tag
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
Date:Mon, 30 Jul 2007 21:22:08 +0200
Author:
|
Re: Where to put Form tag
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" wrote in message
news:%232644ot0HHA.4928@TK2MSFTNGP05.phx.gbl...
>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
>
Date:Mon, 30 Jul 2007 14:09:27 -0700
Author:
|
Re: Where to put Form tag
That was what I figured,
Thanks,
Tom
"Peter Bucher [MVP]" wrote in message
news:OKxGw7t0HHA.5408@TK2MSFTNGP02.phx.gbl...
> 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
Date:Mon, 30 Jul 2007 14:34:24 -0700
Author:
|
Re: Where to put Form tag
"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" wrote in
message news:5D6A7477-A600-4B77-BB0E-FF8BCFD5EE14@microsoft.com...
> 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" wrote in message
> news:%232644ot0HHA.4928@TK2MSFTNGP05.phx.gbl...
>>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
>>
>
Date:Mon, 30 Jul 2007 14:37:47 -0700
Author:
|
|
|