Google+ Followers

Saturday, June 15, 2013

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")

End Sub


No comments:

Post a Comment