Professional Web Applications Themes

asp:form generates invalid code - ASP.NET General

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 ([url]http://www.htmlhelp.com/tools/validator/direct.html[/url]) 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...

  1. #1

    Default 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
    ([url]http://www.htmlhelp.com/tools/validator/direct.html[/url]) 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


    Vaclav Jedlicka Guest

  2. #2

    Default Re: asp:form generates invalid code

    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" <vjedlickaiol.cz> wrote in message
    news:%23KtzJzEUDHA.560TK2MSFTNGP10.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
    > ([url]http://www.htmlhelp.com/tools/validator/direct.html[/url]) 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
    >
    >

    George Ter-Saakov Guest

  3. #3

    Default Re: asp:form generates invalid code

    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" <wehotmail.com> wrote in message
    news:%23AbGtPFUDHA.1552TK2MSFTNGP10.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" <vjedlickaiol.cz> wrote in message
    > news:%23KtzJzEUDHA.560TK2MSFTNGP10.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
    > > ([url]http://www.htmlhelp.com/tools/validator/direct.html[/url]) 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
    > >
    > >
    >
    >

    Vaclav Jedlicka Guest

  4. #4

    Default Re: asp:form generates invalid code

    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" <vjedlickaiol.cz> wrote in message
    news:%23jyLthFUDHA.2264TK2MSFTNGP11.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
    >
    >
    >

    George Ter-Saakov Guest

  5. #5

    Default Re: asp:form generates invalid code

    Because some customers request valid HTML code.

    "George Ter-Saakov" <wehotmail.com> wrote in message
    news:u742h2FUDHA.1868TK2MSFTNGP11.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" <vjedlickaiol.cz> wrote in message
    > news:%23jyLthFUDHA.2264TK2MSFTNGP11.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
    > >
    > >
    > >
    >
    >

    Vaclav Jedlicka Guest

  6. #6

    Default Re: asp:form generates invalid code

    Interesting. I haven't met any customers like this. I hope they also request
    that the application works...

    --
    John Saunders
    Internet Engineer
    [email]john.saunderssurfcontrol.com[/email]


    "Vaclav Jedlicka" <vjedlickaiol.cz> wrote in message
    news:erafBiOUDHA.1324TK2MSFTNGP11.phx.gbl...
    > Because some customers request valid HTML code.
    >
    > "George Ter-Saakov" <wehotmail.com> wrote in message
    > news:u742h2FUDHA.1868TK2MSFTNGP11.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" <vjedlickaiol.cz> wrote in message
    > > news:%23jyLthFUDHA.2264TK2MSFTNGP11.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
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    John Saunders Guest

  7. #7

    Default Re: asp:form generates invalid code

    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 [url]www.microsoft.com/security[/url]
    This posting is provided as is with no warranties and confers no rights.


    Tian Min Huang Guest

Similar Threads

  1. Replies: 0
    Last Post: December 12th, 10:01 AM
  2. Replies: 0
    Last Post: October 23rd, 01:09 AM
  3. #25948 [Opn]: XSLT_SABOPT_DISABLE_ADDING_META - if false generates invalid XML
    By phpdocs at pointbeing dot net in forum PHP Development
    Replies: 0
    Last Post: October 22nd, 04:48 PM
  4. #25948 [NEW]: XSLT_SABOPT_DISABLE_ADDING_META - if false generates invalid XML
    By phpdocs at pointbeing dot net in forum PHP Development
    Replies: 0
    Last Post: October 22nd, 10:11 AM
  5. ANN: Metastorage generates form handling classes
    By Manuel Lemos in forum PHP Development
    Replies: 0
    Last Post: July 10th, 10:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139