Validation Error (Mobile HTML): Element 'h1' is not supported...?

S

SDProgrammerGuy

Hi I am developing a .net mobile app on vs 2005; whenever I have a mobile web
page, and try to add tags such as <h1> (which are valid xhtml), the designer
gives the error: Validation Error (Mobile HTML): Element 'h1' is not
supported and at run time the tags never get emitted.... Yet I need this
functionality!

How can I get this to work? Also what schema is it "validating" against..it
won't let me choose a schema from the drop down? I have googled extensively
and found nothing.... Please help
 
J

JJ

It took me a little while to figure this out also. When using the mobile
web forms, the runtime wants to control all of the output, and it strips out
anything you have on the forms other than controls.

The trick is to embed the HTML code using a Panel mobile control and placing
the HTML in a DeviceSpecific control inside the panel.. Put something like
this where you want to output the <h1> tag:

<mobile:panel id="panHdr1" runat="server">
<mobile:DeviceSpecific id="devHdr1" runat="server">
<Choice Filter="isHTML32">
<ContentTemplate>
<h1>Your Heading</h1>
</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:panel>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top