Adding Meta Tags

Oct 15, 2011 at 10:00 PM

How would I add Meta Data like the following:

    <meta name="apple-mobile-web-app-capable" content="no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

 

I'm doing it now like this:

<fortyfingers:STYLEHELPER AddMetaTags="name=apple-mobile-web-app-capable||content=no" />

However it get rendered in the browser as:

<fortyfingers:STYLEHELPER AddMetaTags="name=apple-mobile-web-app-capable||content=no" />

instead of:

<meta name="apple-mobile-web-app-capable" content="no">

Coordinator
Oct 15, 2011 at 10:14 PM

Your forgetting runat="server"

Oct 15, 2011 at 10:16 PM
Edited Oct 15, 2011 at 10:19 PM

dang....doing it all the time (ain't got anything like that in MVC...if that's an excuse)

[EDIT] : Spoke to fast.  Do the following now and nothing shows up in the source:

<fortyfingers:STYLEHELPER AddMetaTags="name=apple-mobile-web-app-capable||content=no" runat="server" />

Coordinator
Oct 16, 2011 at 8:18 AM

You should use: <fortyfingers:STYLEHELPER AddMetaTags="apple-mobile-web-app-capable:no" runat="server" />

BTW, you can add anything to the head using

AddToHead='<script types="<meta name="apple-mobile-web-app-capable" value ="no" />||<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:regular,bold">'

That way you can inject your external stylesheet too.

Example: <fortyfingers:STYLEHELPER AddToHead='<meta name="apple-mobile-web-app-capable" value ="no" />||<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:regular,bold">' runat="server" />