Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Placing the form tag within dynamically generated text...

Reply
Thread Tools

Placing the form tag within dynamically generated text...

 
 
Stu
Guest
Posts: n/a
 
      01-04-2005
Hi,

I am writing a content management system that has to have W3C compliant
output. The pages are template driven and there are special strings within
the template to be used as placeholders for the content. However, when I
output the content to a literal (as shown below) the body and html tags are
within the form tags.

Is there any way to position the form tags within the dynamically generated
text (ie to just after the opening body tag)?

Also, can anyone point me in the direction of a good tutorial for writing
W3C compliant sites in .Net?

Page in front code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="MyProj._default" %>
<form id="Form1" method="post" runat="server">
<asp:Literal id="litOut" runat="server"></asp:Literal>
</form>
Thanks in advance,

Stu


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      01-04-2005
"Stu" <> wrote in message
news:...
> Hi,
>
> I am writing a content management system that has to have W3C compliant
> output. The pages are template driven and there are special strings within
> the template to be used as placeholders for the content. However, when I
> output the content to a literal (as shown below) the body and html tags
> are within the form tags.
>
> Is there any way to position the form tags within the dynamically
> generated text (ie to just after the opening body tag)?
>
> Also, can anyone point me in the direction of a good tutorial for writing
> W3C compliant sites in .Net?
>
> Page in front code:
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="default.aspx.vb" Inherits="MyProj._default" %>
> <form id="Form1" method="post" runat="server">
> <asp:Literal id="litOut" runat="server"></asp:Literal>
> </form>


If you create a normal .aspx page with the above code, I think you'll find
that the <form> tag is within the <html> and <body> tags. If the <form> tag
is outside, then I think your code must be doing that.

John Saunders


 
Reply With Quote
 
 
 
 
Stu
Guest
Posts: n/a
 
      01-04-2005
Hi,

Yes, this is the point. Each html template requires different headers
(title, stylesheet etc) so I am writing them dynamically in to the page. Is
there and way of forcing the form tag to within the content I am writing to
the literal?

Thanks in advance,

Stu


"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:%...
> "Stu" <> wrote in message
> news:...
>> Hi,
>>
>> I am writing a content management system that has to have W3C compliant
>> output. The pages are template driven and there are special strings
>> within the template to be used as placeholders for the content. However,
>> when I output the content to a literal (as shown below) the body and html
>> tags are within the form tags.
>>
>> Is there any way to position the form tags within the dynamically
>> generated text (ie to just after the opening body tag)?
>>
>> Also, can anyone point me in the direction of a good tutorial for writing
>> W3C compliant sites in .Net?
>>
>> Page in front code:
>> <%@ Page Language="vb" AutoEventWireup="false"
>> Codebehind="default.aspx.vb" Inherits="MyProj._default" %>
>> <form id="Form1" method="post" runat="server">
>> <asp:Literal id="litOut" runat="server"></asp:Literal>
>> </form>

>
> If you create a normal .aspx page with the above code, I think you'll find
> that the <form> tag is within the <html> and <body> tags. If the <form>
> tag is outside, then I think your code must be doing that.
>
> John Saunders
>
>



 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      01-04-2005
"Stu" <> wrote in message
news:%...
> Hi,
>
> Yes, this is the point. Each html template requires different headers
> (title, stylesheet etc) so I am writing them dynamically in to the page.
> Is there and way of forcing the form tag to within the content I am
> writing to the literal?


You've already got one form tag surrounding the literal, and you want
another one inside of it?

Instead, you should do something like the following:

<html>
<head id="header" runat="server"></head>
<body>
<form id="form1" runat="server">
</form>
</body>
</html>

Then, you can add controls to header.Controls.

John Saunders



> "John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
> news:%...
>> "Stu" <> wrote in message
>> news:...
>>> Hi,
>>>
>>> I am writing a content management system that has to have W3C compliant
>>> output. The pages are template driven and there are special strings
>>> within the template to be used as placeholders for the content. However,
>>> when I output the content to a literal (as shown below) the body and
>>> html tags are within the form tags.
>>>
>>> Is there any way to position the form tags within the dynamically
>>> generated text (ie to just after the opening body tag)?
>>>
>>> Also, can anyone point me in the direction of a good tutorial for
>>> writing W3C compliant sites in .Net?
>>>
>>> Page in front code:
>>> <%@ Page Language="vb" AutoEventWireup="false"
>>> Codebehind="default.aspx.vb" Inherits="MyProj._default" %>
>>> <form id="Form1" method="post" runat="server">
>>> <asp:Literal id="litOut" runat="server"></asp:Literal>
>>> </form>

>>
>> If you create a normal .aspx page with the above code, I think you'll
>> find that the <form> tag is within the <html> and <body> tags. If the
>> <form> tag is outside, then I think your code must be doing that.
>>
>> John Saunders
>>
>>

>
>



 
Reply With Quote
 
Stu
Guest
Posts: n/a
 
      01-06-2005
That'll do it - many thanks.

"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:...
> "Stu" <> wrote in message
> news:%...
>> Hi,
>>
>> Yes, this is the point. Each html template requires different headers
>> (title, stylesheet etc) so I am writing them dynamically in to the page.
>> Is there and way of forcing the form tag to within the content I am
>> writing to the literal?

>
> You've already got one form tag surrounding the literal, and you want
> another one inside of it?
>
> Instead, you should do something like the following:
>
> <html>
> <head id="header" runat="server"></head>
> <body>
> <form id="form1" runat="server">
> </form>
> </body>
> </html>
>
> Then, you can add controls to header.Controls.
>
> John Saunders
>
>
>
>> "John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
>> news:%...
>>> "Stu" <> wrote in message
>>> news:...
>>>> Hi,
>>>>
>>>> I am writing a content management system that has to have W3C compliant
>>>> output. The pages are template driven and there are special strings
>>>> within the template to be used as placeholders for the content.
>>>> However, when I output the content to a literal (as shown below) the
>>>> body and html tags are within the form tags.
>>>>
>>>> Is there any way to position the form tags within the dynamically
>>>> generated text (ie to just after the opening body tag)?
>>>>
>>>> Also, can anyone point me in the direction of a good tutorial for
>>>> writing W3C compliant sites in .Net?
>>>>
>>>> Page in front code:
>>>> <%@ Page Language="vb" AutoEventWireup="false"
>>>> Codebehind="default.aspx.vb" Inherits="MyProj._default" %>
>>>> <form id="Form1" method="post" runat="server">
>>>> <asp:Literal id="litOut" runat="server"></asp:Literal>
>>>> </form>
>>>
>>> If you create a normal .aspx page with the above code, I think you'll
>>> find that the <form> tag is within the <html> and <body> tags. If the
>>> <form> tag is outside, then I think your code must be doing that.
>>>
>>> John Saunders
>>>
>>>

>>
>>

>
>



 
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
Placing control tag text in a multiline TextBox Nathan Sokalski ASP .Net 2 01-03-2008 05:42 PM
html forms within the server generated form tag =?Utf-8?B?ZGF2ZS5kb2xhbg==?= ASP .Net 0 06-06-2006 04:57 PM
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
Newbie: Placing DOCTYPE tag on HTML file screws up formatting KS HTML 7 11-10-2004 08:46 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57