473,395 Members | 1,460 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,395 software developers and data experts.

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 2136
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***************@TK2MSFTNGP10.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="javascript">
^Error: required attribute TYPE not specified



"George Ter-Saakov" <we@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.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***************@TK2MSFTNGP10.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****************@TK2MSFTNGP11.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="javascript">
^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**************@TK2MSFTNGP11.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****************@TK2MSFTNGP11.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="javascript">
^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***********@surfcontrol.com
"Vaclav Jedlicka" <vj*******@iol.cz> wrote in message
news:er**************@TK2MSFTNGP11.phx.gbl...
Because some customers request valid HTML code.

"George Ter-Saakov" <we@hotmail.com> wrote in message
news:u7**************@TK2MSFTNGP11.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****************@TK2MSFTNGP11.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="javascript">
^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 RenderPostBackScript method implemented in the Page
class is declared as
private and it has the "<script language="javascript"> 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="javascript">
----> <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
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,...
4
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
7
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>...
2
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....
6
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...
0
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...
6
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"...
3
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.