Reputation: 6030
I have the following code:
lblMetaTag.Text =
"<meta property='" + ctrl.property_name +
"' content='" + ctrl.property_value + "' />";
When it renders to the page - it renders the meta tag and not the string representation.
How do I display it as the string?
Upvotes: 0
Views: 183
Reputation: 49413
Change it to the following:
lblMetaTag.Text =
"< ;meta property='" + ctrl.property_name + "' content='" +
ctrl.property_value + "' /> ;";
Upvotes: 2
Reputation: 25465
This this
lblMetaTag.Text = Server.HtmlEncode(
"<meta property='" + ctrl.property_name +
"' content='" + ctrl.property_value + "' />");
Hope this helps.
Upvotes: 0