tags:

views:

154

answers:

1

At the moment to set a page title you have this on the Master page

<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>

I also want to have the same principal for MetaKeywords and MetaDescription however I don't think this is correct:

<meta name="description" content="<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />" />

Can someone point me in the right direction

Thanks

+2  A: 

Master:

<head runat="server">
    ...
    <asp:ContentPlaceHolder ID="MetaContent" runat="server" />
    ...
</head>

Views:

<asp:Content ID="MetaContent" ContentPlaceHolderID="MetaContent" runat="server">
    <meta name="description" content="..." />
    ...
</asp:Content>
eu-ge-ne
Are you on StackOverflow 24/7? :)
Arnis L.
No, 9-10/7 :)
eu-ge-ne
Are you employed by StackOverflow? Thought I was on here a lot but I have a full time job as well!
Jon
Unfortunately, NO! ;)
eu-ge-ne
Btw, eu-ge-ne - you are one of the reasons I started to check out questions tagged not only with "asp.net-mvc". You are answering too much of them. :D
Arnis L.