RSS

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

12 Jun

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

Advertisements
 
1 Comment

Posted by on June 12, 2013 in ASP.NET

 

Tags:

One response to “Add CSS File At Run Time in ASP.NET using VB.NET

  1. satishbvu

    June 12, 2013 at 9:25 am

    Reblogged this on dotnetfunda.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: