bungpeng Posted January 16, 2004 Posted January 16, 2004 How do I include my external CSS file in my ASP.NET webform dynamically? Quote
bungpeng Posted January 17, 2004 Author Posted January 17, 2004 literal control? I just want to include my CSS file in my webform dynamically, as long as there are some way to do it. Can literal control do it? Quote
kahlua001 Posted January 17, 2004 Posted January 17, 2004 <link rel="stylesheet" type="text/css" href='<asp:Label runat="Server" id="ltCssFile"/>'> ltCssFile.Text = "style.css" Quote
bungpeng Posted January 17, 2004 Author Posted January 17, 2004 <link rel="stylesheet" type="text/css" href='<asp:Label runat="Server" id="ltCssFile"/>'> ??? Are you sure? Can we do that? Quote
kahlua001 Posted January 17, 2004 Posted January 17, 2004 Sorry, I meant <asp:Literal runat="Server" id="ltCssFile"/> Quote
kahlua001 Posted January 18, 2004 Posted January 18, 2004 Well, it works with inline code, but maybe code-behind will not. So you can write the whole <link rel="stylesheet" type="text/css" href="style.css"> in the literal control. Quote
*Gurus* Derek Stone Posted January 18, 2004 *Gurus* Posted January 18, 2004 Any element can be directly accessed via the object model. <link rel="stylesheet" type="text/css" href="" id="stylesheet" runat="server" /> stylesheet.Attributes("href") = "default.css" Quote Posting Guidelines
bungpeng Posted January 19, 2004 Author Posted January 19, 2004 oic.... TQ very much! this is the one I am looking for... Quote
vbFace Posted January 20, 2004 Posted January 20, 2004 Any element can be directly accessed via the object model. <link rel="stylesheet" type="text/css" href="" id="stylesheet" runat="server" /> stylesheet.Attributes("href") = "default.css" WOW! This is fantastic! I can now make a page where a user can enlarge/lessen text size within the page. Nice! Quote
Moderators Robby Posted January 20, 2004 Moderators Posted January 20, 2004 Like my Customize section, you can select the color scheme of the site. http://www.bassicsoftware.com/Customize.aspx Quote Visit...Bassic Software
vbFace Posted January 20, 2004 Posted January 20, 2004 Robby, what do you use on that site that acts like HTML frames? Quote
Moderators Robby Posted January 21, 2004 Moderators Posted January 21, 2004 I never use frames I use templating .... http://www.xtremedotnettalk.com/showthread.php?threadid=78721 Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.