I'm working on some custom views (eg "MyDomainObject/ObjectEdit.aspx"), but which inherit (like the generic views) from Site.WithServices.Master (ie the MasterPageFile="~/Views/Shared/Site.WithServices.Master" attribute is present).
For the custom view, I have some custom CSS, and would like to put it into a Content/MyDomainObject/ObjectEdit.css file and have it loaded selectively by the master file.
I was thinking that a contentPlaceHolder might be the right way to go about this, however, I'm having problems getting this to work...
* Content/MyDomainObject/ObjectEdit.css is my custom CSS
* Views/Shared/Site.WithServices.Master has:
<!-- custom css start --> <asp:ContentPlaceHolder ID="CustomCssContent" runat="server" /> <!-- custom css end -->
* Views/MyDomainObject/ObjectEdit.aspx has:
<asp:Content ID="Content3" ContentPlaceHolderID="CustomCssContent" runat="server">
<link rel="stylesheet" type="text/css" href="../../Content/Communication/ObjectEdit.css" />
Will this not work? Or am I just missing something silly?