How to get valid XHTML from the framework????

Discussion in 'ASP .Net' started by Alan Silver, Feb 9, 2006.

  1. Alan Silver

    Alan Silver Guest

    Hello,

    I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    just spent a very frustrating time trying to fix all the validation
    errors in framework-produced code.

    I posted previously (but haven't had any replies yet) about the
    framework adding a "name" attribute to the form, even though this
    doesn't exist in XHTML 1.0.

    I've now discovered that when you use a treeview, it adds the
    following...

    <script>
    <!--
    function TreeView_PopulateNodeDoCallBack(context,param) {
    WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    NodeData,context,TreeView_ProcessNodeData,false);
    }
    // -->
    </script>

    which is invalid as the <script> tag needs a "type" attribute.

    Anyone know if there's a way of getting it to produce valid XHTML? I've
    hardly started, and I've already found quite a few validation issues.

    --
    Alan Silver
    (anything added below this line is nothing to do with me)
     
    Alan Silver, Feb 9, 2006
    #1
    1. Advertising

  2. Alan,
    Thank you for making the internet a more useable place for the <1% that need
    XHTML conformance today.

    Sincerely
    DWS





    "Alan Silver" wrote:

    > Hello,
    >
    > I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    > just spent a very frustrating time trying to fix all the validation
    > errors in framework-produced code.
    >
    > I posted previously (but haven't had any replies yet) about the
    > framework adding a "name" attribute to the form, even though this
    > doesn't exist in XHTML 1.0.
    >
    > I've now discovered that when you use a treeview, it adds the
    > following...
    >
    > <script>
    > <!--
    > function TreeView_PopulateNodeDoCallBack(context,param) {
    > WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    > NodeData,context,TreeView_ProcessNodeData,false);
    > }
    > // -->
    > </script>
    >
    > which is invalid as the <script> tag needs a "type" attribute.
    >
    > Anyone know if there's a way of getting it to produce valid XHTML? I've
    > hardly started, and I've already found quite a few validation issues.
    >
    > --
    > Alan Silver
    > (anything added below this line is nothing to do with me)
    >
     
    =?Utf-8?B?RFdT?=, Feb 10, 2006
    #2
    1. Advertising

  3. Alan Silver

    Joerg Jooss Guest

    Thus wrote DWS,

    > Alan,
    > Thank you for making the internet a more useable place for the <1%
    > that need XHTML conformance today.


    There are rules and regulations in certain countries that stipulate the use
    of valid XHTML, e.g. to allow for accessibility technologies like screen
    readers. You probably don't care, but you're customer may do...

    Cheers,
    --
    Joerg Jooss
     
    Joerg Jooss, Feb 10, 2006
    #3
  4. Alan Silver

    Bruce Barker Guest

    type is not required. you can supply a meta tag default the script type.

    <META http-equiv="Content-Script-Type" content="text/javascript">


    -- bruce (sqlwork.com)


    "Alan Silver" <> wrote in message
    news:...
    > Hello,
    >
    > I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    > just spent a very frustrating time trying to fix all the validation
    > errors in framework-produced code.
    >
    > I posted previously (but haven't had any replies yet) about the
    > framework adding a "name" attribute to the form, even though this
    > doesn't exist in XHTML 1.0.
    >
    > I've now discovered that when you use a treeview, it adds the
    > following...
    >
    > <script>
    > <!--
    > function TreeView_PopulateNodeDoCallBack(context,param) {
    > WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    > NodeData,context,TreeView_ProcessNodeData,false);
    > }
    > // -->
    > </script>
    >
    > which is invalid as the <script> tag needs a "type" attribute.
    >
    > Anyone know if there's a way of getting it to produce valid XHTML? I've
    > hardly started, and I've already found quite a few validation issues.
    >
    > --
    > Alan Silver
    > (anything added below this line is nothing to do with me)
     
    Bruce Barker, Feb 10, 2006
    #4
  5. Alan Silver

    Peter Blum Guest

    Hi Alan,

    I have found a few XHTML bugs too. As a custom control developer, I don't
    have any choice but to try to get 100% compliance of my web controls.

    I've used the Microsoft bug reporting system to notify them about bugs. Its
    essential that you do the same.

    You can get to it here:
    http://lab.msdn.microsoft.com/ProductFeedback/default.aspx

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "Alan Silver" <> wrote in message
    news:...
    > Hello,
    >
    > I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    > just spent a very frustrating time trying to fix all the validation
    > errors in framework-produced code.
    >
    > I posted previously (but haven't had any replies yet) about the
    > framework adding a "name" attribute to the form, even though this
    > doesn't exist in XHTML 1.0.
    >
    > I've now discovered that when you use a treeview, it adds the
    > following...
    >
    > <script>
    > <!--
    > function TreeView_PopulateNodeDoCallBack(context,param) {
    > WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    > NodeData,context,TreeView_ProcessNodeData,false);
    > }
    > // -->
    > </script>
    >
    > which is invalid as the <script> tag needs a "type" attribute.
    >
    > Anyone know if there's a way of getting it to produce valid XHTML? I've
    > hardly started, and I've already found quite a few validation issues.
    >
    > --
    > Alan Silver
    > (anything added below this line is nothing to do with me)
     
    Peter Blum, Feb 10, 2006
    #5
  6. Alan Silver

    Alan Silver Guest

    In article <>, DWS
    <> writes
    >Alan,
    >Thank you for making the internet a more useable place for the <1% that need
    >XHTML conformance today.


    What was the point of this comment? If you don't have anything sensible
    to say, please don't bother.

    >Sincerely
    >DWS
    >
    >
    >
    >
    >
    >"Alan Silver" wrote:
    >
    >> Hello,
    >>
    >> I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    >> just spent a very frustrating time trying to fix all the validation
    >> errors in framework-produced code.
    >>
    >> I posted previously (but haven't had any replies yet) about the
    >> framework adding a "name" attribute to the form, even though this
    >> doesn't exist in XHTML 1.0.
    >>
    >> I've now discovered that when you use a treeview, it adds the
    >> following...
    >>
    >> <script>
    >> <!--
    >> function TreeView_PopulateNodeDoCallBack(context,param) {
    >> WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    >> NodeData,context,TreeView_ProcessNodeData,false);
    >> }
    >> // -->
    >> </script>
    >>
    >> which is invalid as the <script> tag needs a "type" attribute.
    >>
    >> Anyone know if there's a way of getting it to produce valid XHTML? I've
    >> hardly started, and I've already found quite a few validation issues.
    >>
    >> --
    >> Alan Silver
    >> (anything added below this line is nothing to do with me)
    >>


    --
    Alan Silver
    (anything added below this line is nothing to do with me)
     
    Alan Silver, Feb 13, 2006
    #6
  7. Alan Silver

    Alan Silver Guest

    In article <>, Bruce Barker
    <> writes
    >type is not required. you can supply a meta tag default the script type.
    >
    > <META http-equiv="Content-Script-Type" content="text/javascript">


    Thanks, but this didn't help. The script tag itself still needs a type
    attribute for validity.

    Any other ideas? Other than not using the treeview altogether!! Thanks.

    >-- bruce (sqlwork.com)
    >
    >
    >"Alan Silver" <> wrote in message
    >news:...
    >> Hello,
    >>
    >> I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    >> just spent a very frustrating time trying to fix all the validation
    >> errors in framework-produced code.
    >>
    >> I posted previously (but haven't had any replies yet) about the
    >> framework adding a "name" attribute to the form, even though this
    >> doesn't exist in XHTML 1.0.
    >>
    >> I've now discovered that when you use a treeview, it adds the
    >> following...
    >>
    >> <script>
    >> <!--
    >> function TreeView_PopulateNodeDoCallBack(context,param) {
    >> WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    >> NodeData,context,TreeView_ProcessNodeData,false);
    >> }
    >> // -->
    >> </script>
    >>
    >> which is invalid as the <script> tag needs a "type" attribute.
    >>
    >> Anyone know if there's a way of getting it to produce valid XHTML? I've
    >> hardly started, and I've already found quite a few validation issues.
    >>
    >> --
    >> Alan Silver
    >> (anything added below this line is nothing to do with me)

    >
    >


    --
    Alan Silver
    (anything added below this line is nothing to do with me)
     
    Alan Silver, Feb 13, 2006
    #7
  8. Alan Silver

    Alan Silver Guest

    In article <>, Peter Blum
    <> writes
    >Hi Alan,
    >
    >I have found a few XHTML bugs too. As a custom control developer, I don't
    >have any choice but to try to get 100% compliance of my web controls.
    >
    >I've used the Microsoft bug reporting system to notify them about bugs. Its
    >essential that you do the same.


    Thanks. Have you had any success using this? I submitted a couple of
    (admittedly minor) bug reports using this, and there hasn't been the
    slightest hint of anyone taking any notice of them.

    Ta ra

    >You can get to it here:
    >http://lab.msdn.microsoft.com/ProductFeedback/default.aspx
    >
    >--- Peter Blum
    >www.PeterBlum.com
    >Email:
    >Creator of "Professional Validation And More" at
    >http://www.peterblum.com/vam/home.aspx
    >
    >"Alan Silver" <> wrote in message
    >news:...
    >> Hello,
    >>
    >> I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
    >> just spent a very frustrating time trying to fix all the validation
    >> errors in framework-produced code.
    >>
    >> I posted previously (but haven't had any replies yet) about the
    >> framework adding a "name" attribute to the form, even though this
    >> doesn't exist in XHTML 1.0.
    >>
    >> I've now discovered that when you use a treeview, it adds the
    >> following...
    >>
    >> <script>
    >> <!--
    >> function TreeView_PopulateNodeDoCallBack(context,param) {
    >> WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
    >> NodeData,context,TreeView_ProcessNodeData,false);
    >> }
    >> // -->
    >> </script>
    >>
    >> which is invalid as the <script> tag needs a "type" attribute.
    >>
    >> Anyone know if there's a way of getting it to produce valid XHTML? I've
    >> hardly started, and I've already found quite a few validation issues.
    >>
    >> --
    >> Alan Silver
    >> (anything added below this line is nothing to do with me)

    >
    >


    --
    Alan Silver
    (anything added below this line is nothing to do with me)
     
    Alan Silver, Feb 13, 2006
    #8
  9. Alan Silver

    Alan Silver Guest

    In article <>, Peter Blum
    <> writes
    >I have found a few XHTML bugs too. As a custom control developer, I
    >don't have any choice but to try to get 100% compliance of my web
    >controls.


    Have you ever seen a "name" attribute added to the form? I am having
    this problem at the moment and can't see how to fix it.

    My server side code is...

    <form id="Form1" runat="server">

    ....and the resulting output looks like...

    <form name="aspnetForm" method="post" action="Default.aspx"
    id="aspnetForm">

    Ever seen this? It's stopping my pages from validating. Any suggestions
    as to how to avoid it would be very welcome.

    --
    Alan Silver
    (anything added below this line is nothing to do with me)
     
    Alan Silver, Feb 13, 2006
    #9
  10. Alan Silver

    willnossiter

    Joined:
    Jul 28, 2006
    Messages:
    1
    Valid XHTML from asp.net 2.0

    This will sort your name parameter issue in ASP.NET 2.0 RTM

    <system.web>
    <xhtmlConformance mode="Strict" />
    </system.web>

    Options are Strict, Transitional, Legacy
     
    willnossiter, Jul 28, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    903
  2. Alan Silver
    Replies:
    3
    Views:
    380
    Alan Silver
    Jun 7, 2006
  3. chronos3d
    Replies:
    9
    Views:
    788
    Andy Dingley
    Dec 5, 2006
  4. Usha2009
    Replies:
    0
    Views:
    1,141
    Usha2009
    Dec 20, 2009
  5. xhtml champs
    Replies:
    0
    Views:
    538
    xhtml champs
    Aug 1, 2011
Loading...

Share This Page