I’m trying to make a meta tag in my view based on data in my model…my view code looks like this:
<meta name="description" content="<%=Html.Encode(Model.MetaDescription) %>" />
But my output looks like this:
meta name="description" content="<%=Html.Encode(Model.MetaDescription) %>" />
What the heck am I doing wrong?
You are probably adding this
metatag to a<head>tag which is marked atrunat="server". Try:I don’t have a clear idea about what the actual problem is, as I don’t have the full source, but to workaround: