473,416 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Placing the form tag within dynamically generated text...

Stu
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
Nov 19 '05 #1
4 1798
"Stu" <s.****@cergis.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
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
Nov 19 '05 #2
Stu
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:%2****************@TK2MSFTNGP12.phx.gbl...
"Stu" <s.****@cergis.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
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

Nov 19 '05 #3
"Stu" <s.****@cergis.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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:%2****************@TK2MSFTNGP12.phx.gbl...
"Stu" <s.****@cergis.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
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


Nov 19 '05 #4
Stu
That'll do it - many thanks.

"John Saunders" <johnwsaundersiii at hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP10.phx.gbl...
"Stu" <s.****@cergis.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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:%2****************@TK2MSFTNGP12.phx.gbl...
"Stu" <s.****@cergis.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
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



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Venus | last post by:
Hello, Thanks for your reply. I understand that a control can be created dynamically in several ways: 1) using StringBuilder 2) using Controls.Add 3) using ASP PlaceHolder But this is just...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
7
by: Tom wilson | last post by:
I'm trying to create dynamic controls in ASP.Net. It's driving me nuts. I keep getting the error: Control '16' of type 'RadioButton' must be placed inside a form tag with runat=server. Dim...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
1
verbatim
by: verbatim | last post by:
with the following page, the dynamically generated fields are not recognized when i try to submit the form, or add more elements. when i hit my submit button, the address bar has only x1 - x5 in...
5
by: phpCodeHead | last post by:
I am needing to determine how to go about validating that a field in my form contains only a positive integer. I know that this is fairly simple if the form contains only one element to be...
4
by: greg | last post by:
Hi, I don't think my message posted correctly so here it is. Is there any way to access the individual values of a form text box? I want to iterate through all of the rows and access the...
1
by: divyac | last post by:
I am doing an inventory project using PHP in which there is a text box.The customer id should be entered in that text box.If that customer id is valid,another text box should be generated in which...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.