need help on easy ASP.NET question

M

msnnews.msn.com

hi there,

i have the following code on my ASPX page..:

<LINK id="myCSS" runat="server" href="../print.css" type="text/css"
rel="stylesheet" />

how do i reference this in the behind VB code so i can make the HREF
dynamic?

thanks,
Paul
 
K

Karl Seguin

protected myCSS as HtmlControls.HtmlGenericControl


myCss.Attributes.Add("Href", "styles.css")
 
D

David Jessee

Try this.

<LINK id="myCSS" runat="server" href='<% = CssPath %>' type="text/css"
rel="stylesheet" />

in your code behind....

Protected Readonly Property CssPath
Get
Reutrn "../print.css" ' or whatever
End Get
End Property
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top