473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp:form generates invalid code

Hi all

The code generated by the server side control asp:form generates invalid
code. The HTML tag FORM always contains attribute "name".

When I validate the page with the online validator
(http://www.htmlhelp.com/tools/validator/direct.html) it says that:

<form name="browse" method="post" action="browse_ employees.a ...
^Error: there is no attribute NAME for this element (in this HTML
version)

How can I prevent asp:form from generating this attribute?

Thanks in advance

Vaclav Jedlicka
Nov 17 '05 #1
6 2149
Just validated the following HTML

---------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title></title>

</head>
<body>
<form name="Asd" action="asd"></form>

</body>
</html>

-----------------------------------

It did not complain that <form> has a name.

George.
"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hi all

The code generated by the server side control asp:form generates invalid
code. The HTML tag FORM always contains attribute "name".

When I validate the page with the online validator
(http://www.htmlhelp.com/tools/validator/direct.html) it says that:

<form name="browse" method="post" action="browse_ employees.a ...
^Error: there is no attribute NAME for this element (in this HTML version)

How can I prevent asp:form from generating this attribute?

Thanks in advance

Vaclav Jedlicka

Nov 17 '05 #2
Thanks

You use HTML 4.01, I used 4.0, that is why I had the problem. I can fix my
problem by using version 4.01.

May I have another question? I am havening this problem with the validator
(even with HTML 4.01). The SCRIPT tag is generated by ASP.NET

<script language="javas cript">
^Error: required attribute TYPE not specified



"George Ter-Saakov" <we@hotmail.com > wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Just validated the following HTML

---------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title></title>

</head>
<body>
<form name="Asd" action="asd"></form>

</body>
</html>

-----------------------------------

It did not complain that <form> has a name.

George.
"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hi all

The code generated by the server side control asp:form generates invalid
code. The HTML tag FORM always contains attribute "name".

When I validate the page with the online validator
(http://www.htmlhelp.com/tools/validator/direct.html) it says that:

<form name="browse" method="post" action="browse_ employees.a ...
^Error: there is no attribute NAME for this element (in this

HTML
version)

How can I prevent asp:form from generating this attribute?

Thanks in advance

Vaclav Jedlicka


Nov 17 '05 #3
Why would you care about all that?
There are about 95% of IE out there and a handful of other browsers.
I do knot know even one browser that requires to have TYPE.

George.

"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Thanks

You use HTML 4.01, I used 4.0, that is why I had the problem. I can fix my
problem by using version 4.01.

May I have another question? I am havening this problem with the validator
(even with HTML 4.01). The SCRIPT tag is generated by ASP.NET

<script language="javas cript">
^Error: required attribute TYPE not specified

Nov 17 '05 #4
Because some customers request valid HTML code.

"George Ter-Saakov" <we@hotmail.com > wrote in message
news:u7******** ******@TK2MSFTN GP11.phx.gbl...
Why would you care about all that?
There are about 95% of IE out there and a handful of other browsers.
I do knot know even one browser that requires to have TYPE.

George.

"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Thanks

You use HTML 4.01, I used 4.0, that is why I had the problem. I can fix my problem by using version 4.01.

May I have another question? I am havening this problem with the validator (even with HTML 4.01). The SCRIPT tag is generated by ASP.NET

<script language="javas cript">
^Error: required attribute TYPE not specified


Nov 17 '05 #5
Interesting. I haven't met any customers like this. I hope they also request
that the application works...

--
John Saunders
Internet Engineer
jo***********@s urfcontrol.com
"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:er******** ******@TK2MSFTN GP11.phx.gbl...
Because some customers request valid HTML code.

"George Ter-Saakov" <we@hotmail.com > wrote in message
news:u7******** ******@TK2MSFTN GP11.phx.gbl...
Why would you care about all that?
There are about 95% of IE out there and a handful of other browsers.
I do knot know even one browser that requires to have TYPE.

George.

"Vaclav Jedlicka" <vj*******@iol. cz> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Thanks

You use HTML 4.01, I used 4.0, that is why I had the problem. I can
fix
my problem by using version 4.01.

May I have another question? I am havening this problem with the validator (even with HTML 4.01). The SCRIPT tag is generated by ASP.NET

<script language="javas cript">
^Error: required attribute TYPE not specified



Nov 17 '05 #6
Hello Vaclav,

I just did a quick search and found that it is a known issue. It seems
you're out of luck. The RenderPostBackS cript method implemented in the Page
class is declared as
private and it has the "<script language="javas cript"> string hard-coded
into it. Also there are other methods that will output the script tag this
way so as a quick and workaround you could override the rendering of the
Page and do a search & replace operation (<script language="javas cript">
----> <script type="text/javascript">) before rendering the contents.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
Nov 17 '05 #7

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

Similar topics

9
2376
by: cooldv | last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this code: message = Replace(usermessage, "'", "''"). My problem is DISPLAYING data in an asp FORM, from an an access database, when the data already contains a " sign problem is like this: access database .... to update on the internet .... a *dataupdate.asp* page ..... On this page, the data gets displayed in a form where i
4
1919
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
7
3615
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
2
2010
by: iam247 | last post by:
Hi I have an ASP form which only includes an option list. The list is dynamically created but includes a default value, which is an instruction "Select a group". The code is shown at bottom. I want to ensure the user does not submit the form with the default value selected.
6
2531
by: Jack | last post by:
Hi, I have an Access application which need to be converted to asp-sql server application. This Access application uses a single form. This form has got a SS number with names and age. The form has two subforms. One of the subform uses a physical test score which is basically four different fields while the other subform is one that has a written test score with three fields. Entry to both physical and written scores are done through this...
0
2181
by: jianxin9 | last post by:
Hi everyone, I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can select which department they will send the form to (we are trying to consolidate forms). This is what I have so far, but when I test the form, I keep getting this error message: Mailing Failed... Error is: FromAddress Property cannot be blank. You...
6
6878
by: brainlpb | last post by:
I'm trying to adapt a PHP shopping cart code to ASP: The cart outputs the SQL product list to a HTML a page where the client enters the quantity they want of each SKU: <FORM ACTION="page.asp" METHOD=POST> <INPUT TYPE="TEXT" NAME="SKU" SIZE="3" VALUE=""> <INPUT TYPE="TEXT" NAME="SKU" SIZE="3" VALUE=""> <INPUT TYPE="TEXT" NAME="SKU" SIZE="3" VALUE=""> <INPUT TYPE="TEXT" NAME="SKU" SIZE="3" VALUE=""> </FORM>
3
1089
by: j0rdanf1 | last post by:
Hey, I have been working on creating a basic login for a website now for 2 days and still have gotten no further. So far I think the form is correct, it has to fields a username and a password field, this then gets submitted to the check.asp via the post method then the vb script is meant to link to the sql database and validate if the login information is present in the database. If it is redirect to welcome.asp, else goto login.asp ...
0
9480
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,...
0
10146
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
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
8968
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
6735
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
5378
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.