I am using asp.NET with masterpages and usercontrols.
In MasterPage:
Doing
<link href='<%=ResolveUrl("~/path/file.css")%>' rel="stylesheet" type="text/css" />
will not work and the css will not load BUT
Doing
<link runat="server" href='~/path/file.css' rel="stylesheet" type="text/css" />
will work and the css will load
In User Control:
Doing
<link runat="server" href='~/path/file.css' rel="stylesheet" type="text/css" />
will not work and the css will not load
BUT
Doing
<link href='<%=ResolveUrl("~/path/file.css")%>' rel="stylesheet" type="text/css" />
will work and the css will load
In master page ResolveUrl doesn't work and runat="server" works where in user control the opposite is the true. Maybe I worng and I appriciate if someone will check this. If this is the situation, what is the reason for this inconsistency?