Results 1 to 9 of 9

Thread: ASP.NET & XHTML MP 1.0 compliance

  1. #1
    New Member
    Join Date
    Jul 2009
    Posts
    11

    Default ASP.NET & XHTML MP 1.0 compliance

    Guys.

    I've been programming mobi in ASP.NET for a while with some luck.
    However, in the ready.mobi test, I ALWAYS fail the XHTML Mobile Profile test and Valid Markup test. Yes, I did LOTS of searching already.
    It seems ANY Form will fail this test. (I got a score of 5 using pure HTML)

    I'm just trying to do simple stuff. You know, a textbox, label, etc. and a submit button going to the code-behind.

    Basically, I use Visual Studio 2008, C#, Web Application Forms, .NET 3.5, HTML 4.0 controls. (This seems to work best after countless hours of frustration).

    The DOCTYPE is
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

    I must be missing something basic. I REALLY HOPE to find the answer.

    Thanks!
    (btw, this forum is awesome).

  2. #2
    New Member
    Join Date
    Jul 2009
    Posts
    11

    Default

    I'm getting no replies Is it really so hard to get xHTML MP compliance using Visual Studio 2008?

  3. #3
    Founding Member Scandiman's Avatar
    Join Date
    Jun 2007
    Location
    NorCal
    Posts
    9,538

    Default

    Most people here use PHP, but there are a few asp.net coders. Perhaps you can get some insights at mobiforge, http://mobiforge.com/asp-net

  4. #4
    Senior Member gogo's Avatar
    Join Date
    Oct 2007
    Location
    planet Gogon - M25 class planet
    Posts
    3,452

    Default

    forms can validate fine on ready.mobi - I just checked one.

    have you tried checking it with the W3 validator http://validator.w3.org/#validate_by_uri
    which gives more specific messages.

    ready.mobi doesn't like anything that isn't inside a div, p, h or other tag and if you have css in your doc head with any comments in it you get mystery errors. Also sometimes it objects to empty spaces in markup.

    You could try comparing your form with one that does validate? This doesn't sound like an ASP problem to me.


    these might be relevant
    http://mobiforge.com/forum/developin...g-aspnet-forms
    http://forums.asp.net/t/1314153.aspx
    http://forums.asp.net/t/1405148.aspx
    Last edited by gogo; 07-11-2009 at 07:13 AM. Reason: add links

  5. #5
    Administrator Andres Kello's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona
    Posts
    3,548

    Default

    Hi enewman, if you click on the "Valid Markup" link in the "Dotmobi compliance tests", the Ready.mobi tool will actually tell you exactly where and why you are failing the validation.

    Have a read through the errors and see if that helps you validate and fix the code. If you're still having difficulty, post the errors here and we'll give you a hand.
    My .mobi's: Dating.mobi | Dubai.mobi | Adult.mobi | Banking.mobi | Student.mobi | Call.mobi | Horoscope.mobi | Messenger.mobi | Classifieds.mobi | LiveTV.mobi

    Developed: Yup.mobi | Mobility
    | Why .mobi? | Banking | Vuelos | Airline Complaints | Random Site | Whois | Free Mobile Dating | Free Dictionary | Free Thesaurus | Horoscope | Astrology | Free Translation | Exchange Rates


  6. #6
    New Member
    Join Date
    Jul 2009
    Posts
    11

    Default

    Thank you for the excellent comments! I will try your suggestions.. The links also gave me some ideas.
    I did click on the Valid Markup and I was able to slowly increase my score. One test I always fail is the XHTML Mobile Profile.
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    Here is another one I always get wrong:
    <body>
    <form method="post" action="/index.aspx" id="form1">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"

    FAIL near line 60 column 12
    The content of element type "form" must match "(h1|h2|h3|h4|h5|h6|ul|ol|dl|p|div|pre|blockquote| address|hr|table|fieldset)+".

    These errors give me a "Error 502, can't load page"

    The other solutions I'm able to find myself.

    Last edited by enewmen; 07-11-2009 at 10:47 AM.

  7. #7
    Senior Member GijsZePa's Avatar
    Join Date
    Jul 2007
    Location
    Nieuw-Vennep, The Netherlands
    Posts
    2,800

    Default

    Add this to your web.config:

    Code:
    <configuration> 
     
      <system.web> 
          .........
          ..........
     
         <xhtmlConformance mode="Strict" /> 
     
      </system.web> 
     
    </configuration>

    Quote Originally Posted by enewmen View Post
    Thank you for the excellent comments! I will try your suggestions.. The links also gave me some ideas.
    I did click on the Valid Markup and I was able to slowly increase my score. One test I always fail is the XHTML Mobile Profile.
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    Here is another one I always get wrong:
    <body>
    <form method="post" action="/index.aspx" id="form1">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"

    FAIL near line 60 column 12
    The content of element type "form" must match "(h1|h2|h3|h4|h5|h6|ul|ol|dl|p|div|pre|blockquote| address|hr|table|fieldset)+".

    These errors give me a "Error 502, can't load page"

    The other solutions I'm able to find myself.

    <signature police forced me to remove my image that was too large and had nothing to do with a mobi site >


    Autodisk.mobi - all dutch carspecs | Manage all your holiday accommodations with our online manager.

  8. #8
    Senior Member gogo's Avatar
    Join Date
    Oct 2007
    Location
    planet Gogon - M25 class planet
    Posts
    3,452

    Default

    Quote Originally Posted by enewmen View Post
    <body>
    <form method="post" action="/index.aspx" id="form1">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"

    FAIL near line 60 column 12
    The content of element type "form" must match "(h1|h2|h3|h4|h5|h6|ul|ol|dl|p|div|pre|blockquote| address|hr|table|fieldset)+".

    These errors give me a "Error 502, can't load page"
    Hi have you tried putting the form inside a <div>
    and then after the <form> tag try creating another <div> that contains all the <input> tags inside the form.

    imo a lot of probs you get on ready.mobi are solved by just creating new divs.

    HTH.

  9. #9
    New Member
    Join Date
    Jul 2009
    Posts
    11

    Default

    Quote Originally Posted by gogo View Post
    Hi have you tried putting the form inside a <div>
    and then after the <form> tag try creating another <div> that contains all the <input> tags inside the form.

    imo a lot of probs you get on ready.mobi are solved by just creating new divs.

    HTH.
    Yes, I will try this and all the other suggestions people have.
    Thanks again!

Similar Threads

  1. Who Knows xHTML Here.
    By Achilles1963 in forum News & Discussion
    Replies: 3
    Last Post: 08-20-2009, 12:18 AM
  2. XHTML or HTML ?
    By noonoo1 in forum Mobile Web Design
    Replies: 3
    Last Post: 08-02-2008, 05:21 AM
  3. xhtml/wml
    By jay32 in forum Mobile Advertising
    Replies: 1
    Last Post: 05-26-2008, 02:14 AM
  4. xhtml problem
    By supermobi in forum Mobile Web Design
    Replies: 8
    Last Post: 02-21-2008, 01:47 AM
  5. ASP.NET 2.0 / XHTML-MP Examples
    By LaMondeA in forum Mobile Web Design
    Replies: 1
    Last Post: 11-20-2007, 08:18 PM

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
  •  
A Yup.mobi Mobile Site
Mobile Dating