New feature! Upgrade and increase expert visibility of your issues with Priority Questions.
I want to add a stylesheet in the codebehind using this simple code snippet, my page doesn't have anything else.
Partial Class ABC Inherits System.Web.UI.Page Dim newStyleSheet As New HtmlLink() newStyleSheet.Href = "include/StyleSheet.css" newStyleSheet.Attributes.Add("rel", "stylesheet") newStyleSheet.Attributes.Add("type", "text/css") 'Page.Header.Controls.Add(link) End Class
Join the community of 500,000 technology professionals and ask your questions.