PC Review


Reply
Thread Tools Rate Thread

asp:form generates invalid code

 
 
Vaclav Jedlicka
Guest
Posts: n/a
 
      22nd Jul 2003
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


 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      22nd Jul 2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Vaclav Jedlicka
Guest
Posts: n/a
 
      22nd Jul 2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      22nd Jul 2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
Vaclav Jedlicka
Guest
Posts: n/a
 
      23rd Jul 2003
Because some customers request valid HTML code.

"George Ter-Saakov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> >
> >

>
>



 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      23rd Jul 2003
Interesting. I haven't met any customers like this. I hope they also request
that the application works...

--
John Saunders
Internet Engineer
(E-Mail Removed)


"Vaclav Jedlicka" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Because some customers request valid HTML code.
>
> "George Ter-Saakov" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > 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
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Tian Min Huang
Guest
Posts: n/a
 
      23rd Jul 2003
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
VB Code generates error on another machine? =?Utf-8?B?UmljaGFyZCBTbW9saWsgKEtvcmRpYSk=?= Microsoft Excel Programming 4 9th Aug 2007 07:48 AM
Forwarding Meeting Request generates invalid Sent Time =?Utf-8?B?VHJhdmlz?= Microsoft Outlook Calendar 0 24th Oct 2006 07:42 PM
Control inside asp:Repeater generates ArgumentException: Invalid postback or callback argument. Timbo Microsoft ASP .NET 1 5th May 2006 05:34 PM
Who generates the Invalid Username/Password Error message? P. Jayant Windows XP General 8 10th Nov 2004 09:43 PM
Help!!! What is invalid Error code 1400 invalid window handle Alan Windows XP General 1 4th Apr 2004 12:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:18 AM.