ʞᴉɯ ʞᴉɯ - 2 months ago 4x
ASP.NET (C#) Question

Asp.net delimiter <% replaced with &lt;% in head tag?

Maybe its a stupid question, but i'm having this issue in Visual Studio 2010:

in my Master page i've this code:

<head runat="server">

<title>App Title</title>
<asp:ContentPlaceHolder ID="head" runat="server">
<link href="<%= App.RootPath %>Css/style.css" rel="stylesheet" type="text/css" />

for some strange reason the
is changed at runtime with

<%= App.RootPath %>
works normal if put anywhere outside head tag.

Anyone has never experienced this and resolved?


If i put off runat="server" in head tag, it works. But i need it.


All of these methods work, but the problem is lack of designer support?


For now, i've found this workaroud; still searching for the reason of this behaviour.

<link <%= "href=" +App.RootPath +"Css/style.css" %> rel="stylesheet" type="text/css" />