[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

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

SDProgrammerGuy

6/29/2006 4:08:00 AM

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
1 Answer

JJ

7/1/2006 4:23:00 AM

0

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>


"SDProgrammerGuy" <SDProgrammerGuy@discussions.microsoft.com> wrote in
message news:044052B1-129A-492B-8F77-CB6551443470@microsoft.com...
> 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