I know how to get the information from the database, just need an example of how I can change the stylesheet on the flyHi,
just place your <link> tag like you normally would but also add this:
runat="server" id="myDynamicLink"
In your code-behind you just add the line:
protected myDynamicLink ashtmlgenericcontrol.
There you can set the properties in code-behind that you need.
Grz, Kris.
Still not sure exactly how this will work, this is what I have already.
<link href="http://links.10026.com/?link=stylesheets/default.css" type="text/css" rel="stylesheet" /
do you mean like the following.
<link id=myDynamicLink type="text/css" rel="stylesheet" runat="server" /
here is an example using the webconfig, you can change the href property to whatever.
<link id="Stylesheet" runat="server"></link
Dim link As System.Web.UI.HtmlControls.HtmlGenericControl
link = Me.Page.FindControl("Stylesheet")
link.Attributes("rel") = "stylesheet"
link.Attributes("href") = ConfigurationSettings.AppSettings("CSSNAME")
link.Attributes("type") = "text/css"
0 comments:
Post a Comment