tags:

views:

52

answers:

1

i keep getting Compilation errors when i try to do this . .is there anyway to do this inside the site.master file?

+3  A: 

Did you add the master page as an MVC master page?

The Url property that you'rew trying to use comes from the MVC framework's ViewMasterPage class. If you added a regular master page, you need to make it inherit from ViewMasterPage. To do this, change the first line to

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
SLaks