473,795 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="def ault.aspx.vb"
Inherits="MyPro j._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 1822
"Stu" <s.****@cergis. com> wrote in message
news:eg******** ******@TK2MSFTN GP09.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="def ault.aspx.vb" Inherits="MyPro j._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" <johnwsaundersi ii at hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Stu" <s.****@cergis. com> wrote in message
news:eg******** ******@TK2MSFTN GP09.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="def ault.aspx.vb" Inherits="MyPro j._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******** ********@TK2MSF TNGP10.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" <johnwsaundersi ii at hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Stu" <s.****@cergis. com> wrote in message
news:eg******** ******@TK2MSFTN GP09.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="def ault.aspx.vb" Inherits="MyPro j._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" <johnwsaundersi ii at hotmail.com> wrote in message
news:Of******** ******@TK2MSFTN GP10.phx.gbl...
"Stu" <s.****@cergis. com> wrote in message
news:%2******** ********@TK2MSF TNGP10.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" <johnwsaundersi ii at hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
"Stu" <s.****@cergis. com> wrote in message
news:eg******** ******@TK2MSFTN GP09.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="def ault.aspx.vb" Inherits="MyPro j._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
3313
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 for the controls and not for the form itself. What I am trying to achieve is to create an entire form (including controls)
6
2238
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 corrent number of controls. The problem is that they appear next to each other. I want to create the controls with some wording to the left of them (again, dynamically generated). Normally id use <table> with two colums, one for the
7
6399
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 Place1 As New PlaceHolder Controls.Add(Place1) For y = 1 To Choices.RecordCount Choices.MoveTo(y)
3
2186
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 multiple-form application that displays two forms when it starts, each with a text box. Add code to each text box’s TextChanged event (this is the
27
4759
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 appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
1
2270
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 the query string, and does not append any of the dynamically generated fields. any ideas how to fix this? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html>
5
7145
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 validated; but, a much bigger challenge ( to me anyway, that's why I'm coming to the pros! ) when I don't know exactly how many fields may appear on the form as it is dynamically generated based upon the number of line items to be received on a purchase...
4
2822
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 values of a text box in my form. thanks.
1
2479
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 the product id should be entered..If that product id is valid,other 3 text boxes should be generated dynamically in order to do transaction.is it possible to generate forms without a button click?...The order of the forms should be as follows: ...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10164
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.