I have two masterpages. A main.Master and a search.Master.
The search.Master is a nested masterpage, which is "inside" the main.Master. To get my CSS files work with masterpages, I had to place the runat="server" atribute. Like this:
<link runat="server" href="~/mp/css/master.main.css" rel="stylesheet" type="text/css" />
And is working wonderfull in the masterpage. However, this nested masterpage has her own styles, so I tried to do the runat="server" trick again. I made sure that my asp:content was inside the and typed:
<link runat="server" href="~/mp/css/master.search.css" rel="stylesheet" type="text/css" />
However, when I checked the source code of my website, the path shown there was:
~/mp/css/master.search.css
Insetead of the
../../mp/css/master.search.css
Anyone know why this is happening? And how to solve this?
PS: I do not want to use the <%= ResolveClientUrl("bla bla bla") %>, because it is messing arround with the mastrepage/theme relationship. And I would prefer not to insert the CSS stylesheets in the header from the ServerSide code.