For some reason, I am getting a runtime exception when I try to use Page.ResolveURL or Url.Content within the default masterpage (Site.Master) in my newly created asp.net mvc application. This is very odd, because I have been using the ResolveURL helper function in .NET for years without issue. Here is my code snippet:
<link href="<%= Url.Content("~/css/style.css"); %>" rel="stylesheet" type="text/css" />
And here is the runtime error that occurs on the very same line:
Compiler Error Message: CS1026: ) expected
If I change the href to a static URL, everything is fine. Also, this is a brand new ASP.NET mvc project....this was the first line of code that I changed.