ASP.NET WebForms view engine unable to parse server-side tag
I have the following line in an MVC view:
<meta name="msapplication-starturl"
content="<%= Url.BaseServerHttpUrl() + gaPinningCampaign %>" />
This simply renders out:
<meta name="msapplication-starturl"
content="<%= Url.BaseServerHttpUrl() + gaPinningCampaign %>" />
The way I found round it was to prepend an empty string do this:
<meta name="msapplication-starturl"
content="<%= "" + Url.BaseServerHttpUrl() + ga开发者_JAVA百科PinningCampaign %>" />
Any ideas why the parser is getting confused and what a cleaner way to get around this would be?
Just remove runat="server" from head tag,
精彩评论