Author: paulsaxelby | Posted on: 10/17/2009 3:21:05 AM | Views : 243

Hi,
This question is purely to help my understanding of the language, it's not a problem as such - other than being a slight resource waste.
I've been looking at adding meta-tags from code. The example I found was this:
System.Web.UI.WebControls.Literal nl1 = new System.Web.UI.WebControls.Literal(); System.Web.UI.WebControls.Literal nl2 = new System.Web.UI.WebControls.Literal(); System.Web.UI.WebControls.Literal nl3 = new System.Web.UI.WebControls.Literal(); nl1.Text = System.Environment.NewLine; nl2.Text = System.Environment.NewLine; nl3.Text = System.Environment.NewLine; HtmlMeta meta = new HtmlMeta(); meta.Name = "keywords"; meta.Content = "Some words listed here"; this.Page.Header.Controls.AddAt(0, nl1); this.Page.Header.Controls.AddAt(0, meta); // Render: <meta name="robots" co ...

Go to the complete details ...