Shaver Code:
@MetaTagTitle =" test title"
Does not complete the assignment, but displays the contents of the MetaTagTitle, followed by the rest of the line.
This translates to something like this (not really, just to get the point):
Response.Write(Html.Encode(MetaTagTitle));
Response.Write(" = \" test title\"");
What you need:
@{ MetaTagTitle = "test title"; }
This will lead to code execution and will not display it.
source
share