I’m currently doing something like this:
var ph = Page.FindControl("phHead");
if (null != ph)
{
var metaTag = new HtmlGenericControl("meta");
metaTag.Attributes.Add("name", "name_goes_here");
metaTag.Attributes.Add("content", "content_goes_here");
ph.Controls.Add(metaTag);
}
What I need to do is a comment into the same control. Is there a way to create a control that’s just plain old <!-- comment here --> and use it in Controls.Add()?
Thanks
You can use a
LiteralControland populate it with an HTML comment.