You don't have to put your controls inside a <form>. Not 100% sure on the
rules, but individual controls that need the viewstate seem to error if
placed outside the <form>. However you can put custom controls outside the
<form>.
In above I assume <form> is a server-side form with runat="server"
If you want to use non-ASP controls you can put them outside the form, or
you can even have multiple forms on the page as long as only one has
runat="server" and they are not nested.
You don't need to put your controls in the <div> either, you can delete it,
it is just part of the blank page template.
> We know we need to put inside the <form> element, because the ASP
> control needs postback.
[quoted text clipped - 6 lines]
>
> Thanks in advance.
S_K - 08 Apr 2008 23:01 GMT
> You don't have to put your controls inside a <form>. Not 100% sure on the
> rules, but individual controls that need the viewstate seem to error if
[quoted text clipped - 26 lines]
>
> - Show quoted text -
Putting your controls inside a <div> element is recomended.
The nice thing about <div>s is that you can use a StyleSheet!
This makes formating and mantainence very easy.
Steve
ckkwan@my-deja.com - 09 Apr 2008 01:55 GMT
Thanks for the info.
If it is just because of CSS, then I think I can afford to do without
it. It is not difficult to add the <DIV> later when I really need to
format the entire page with CSS. :)
> Putting your controls inside a <div> element is recomended.
> The nice thing about <div>s is that you can use a StyleSheet!
[quoted text clipped - 3 lines]
>
> - Show quoted text -
Patrice - 09 Apr 2008 09:34 GMT
AFAIK this is a compliance issue. My understanding is that an inline tag
should be inside a container block tag. The form just defones the behvaior
for inner fields and is not considered as a container. Or something
similar...
Try to validate once the tag is removed to see if it sill passes...
--
Patrice
Thanks for the info.
If it is just because of CSS, then I think I can afford to do without
it. It is not difficult to add the <DIV> later when I really need to
format the entire page with CSS. :)
On Apr 9, 6:01 am, S_K <steve_kers...@yahoo.com> wrote:
> On Apr 8, 7:41 am, "Aidy" <noem...@noemail.xxx> wrote:
>
[quoted text clipped - 5 lines]
>
> - Show quoted text -
Patrice - 09 Apr 2008 12:20 GMT
I checked the exact reason.
This is because whatever you show must be inside an inline or a block
element. Similarly you can't use
...<body>SomeText</body>... you have to wrap SomeText inside for example a
span or a div....
--
Patrice
> AFAIK this is a compliance issue. My understanding is that an inline tag
> should be inside a container block tag. The form just defones the behvaior
[quoted text clipped - 22 lines]
>>
>> - Show quoted text -