JSEDLAK » Blog Archive » Linking To CSS Files In MasterPages

Linking To CSS Files In MasterPages

A common problem for beginning ASP.NET developers is relative linking to CSS files in a MasterPage file. As it turns out, this is incredibly easy as shown below. Even better is that it works in ASP.NET MVC!

1
<link rel="Stylesheet" href="<%= ResolveUrl("css/Master.css") %>" type="text/css" media="screen" />

Leave a Reply