By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

need help on easy ASP.NET question

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
protected myCSS as HtmlControls.HtmlGenericControl
myCss.Attributes.Add("Href", "styles.css")
--
MY ASP.Net tutorials
http://www.openmymind.net/
"msnnews.msn.com" <mi******@hotmail.com> wrote in message
news:OK****************@TK2MSFTNGP11.phx.gbl...
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

Nov 19 '05 #2

P: n/a
thanks heaps:))

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OW****************@TK2MSFTNGP09.phx.gbl...
protected myCSS as HtmlControls.HtmlGenericControl
myCss.Attributes.Add("Href", "styles.css")
--
MY ASP.Net tutorials
http://www.openmymind.net/
"msnnews.msn.com" <mi******@hotmail.com> wrote in message
news:OK****************@TK2MSFTNGP11.phx.gbl...
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


Nov 19 '05 #3

P: n/a
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

"msnnews.msn.com" <mi******@hotmail.com> wrote in message
news:OK****************@TK2MSFTNGP11.phx.gbl...
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

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.