Month: December 2008

XSL: Turning Off XML Declaration

No Picture

When using the system.web.ui.webcontrols.xml control to transform an xml file to html (using an xsl stylesheet), the control was adding a <?xml version=”1.0″ ?> declaration to the output. To turn this off, simple add the following to your…

Read More »

Quicknote: Adding a CSS reference from code

No Picture

To add a CSS reference from in code, simply do the following: protected void Page_Init(object sender, EventArgs e) {     HtmlLink link = new HtmlLink();     link.Href = “mystylesheet.css”;     link.Attributes.Add(“rel”, “stylesheet”);     link.Attributes.Add(“type”, “text/css”);     Page.Header.Controls.Add(link); }

Read More »