RSS

Tag Archives: adding Css

Add CSS File At Run Time in ASP.NET using VB.NET

To Add CSS File At Run Time

Following Code Will Help you to Add Css At Run time in Page

Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load

Dim myHtmlLink1 As New HtmlLink
myHtmlLink1.Href = "../Css/Stylesheet.css"
myHtmlLink1.Attributes.Add("rel", "stylesheet")
myHtmlLink1.Attributes.Add("type", "text/css")
Page.Header.Controls.Add(myHtmlLink1)

End Sub

 
1 Comment

Posted by on June 12, 2013 in ASP.NET

 

Tags: