<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forum.4penny.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET - All Comments</title><link>http://forum.4penny.net/blogs/aspnet/default.aspx</link><description>Notes, Tricks and Tips on ASP.NET Coding</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>re: Dynamic Style Sheet Links in ASP.NET </title><link>http://forum.4penny.net/blogs/aspnet/archive/2007/01/11/dynamic-style-sheet-links-in-asp-net.aspx#1284</link><pubDate>Sun, 21 Sep 2008 01:30:51 GMT</pubDate><guid isPermaLink="false">05d3ee43-09e1-4c21-9d53-64ecaf1acc4f:1284</guid><dc:creator>Doug</dc:creator><description>&lt;p&gt;Nice tip, thanks&lt;/p&gt;
&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1284" width="1" height="1"&gt;</description></item><item><title>re: Dynamic Style Sheet Links in ASP.NET </title><link>http://forum.4penny.net/blogs/aspnet/archive/2007/01/11/dynamic-style-sheet-links-in-asp-net.aspx#1087</link><pubDate>Fri, 20 Jun 2008 08:29:49 GMT</pubDate><guid isPermaLink="false">05d3ee43-09e1-4c21-9d53-64ecaf1acc4f:1087</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;It works also in ASP.Net 1.1&lt;/p&gt;
&lt;p&gt;You must declare first the &amp;quot;Stylesheet1&amp;quot; in the code behind file.&lt;/p&gt;
&lt;p&gt;Add on the *.aspx file the tag &amp;lt;link runat=&amp;quot;server&amp;quot; id=&amp;quot;Stylesheet1&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;On the code behind add on the top of your class &lt;/p&gt;
&lt;p&gt;Protected Stylesheet1 as System.Web.UI.HtmlControls.HtmlGenericControl&lt;/p&gt;
&lt;p&gt;And now you can use it on the load event of your page. &lt;/p&gt;
&lt;p&gt;Stylesheet1.Attributes.Add(&amp;quot;href&amp;quot;,&amp;quot;../styles/my.css&amp;quot;)&lt;/p&gt;
&lt;p&gt;Stylesheet1.Attributes.Add(&amp;quot;type&amp;quot;,&amp;quot;text/css&amp;quot;)&lt;/p&gt;
&lt;p&gt;Stylesheet1.Attributes.Add(&amp;quot;rel&amp;quot;,&amp;quot;stylesheet&amp;quot;)&lt;/p&gt;
&lt;p&gt;I hope its helpfully.&lt;/p&gt;
&lt;p&gt;Greets from Switzerland&lt;/p&gt;
&lt;p&gt;Andy&lt;/p&gt;
&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1087" width="1" height="1"&gt;</description></item><item><title>re: Dynamic Style Sheet Links in ASP.NET </title><link>http://forum.4penny.net/blogs/aspnet/archive/2007/01/11/dynamic-style-sheet-links-in-asp-net.aspx#1071</link><pubDate>Sun, 15 Jun 2008 05:55:09 GMT</pubDate><guid isPermaLink="false">05d3ee43-09e1-4c21-9d53-64ecaf1acc4f:1071</guid><dc:creator>sarah</dc:creator><description>&lt;p&gt;Says, &amp;quot;Style1 is not declared&amp;quot;&lt;/p&gt;
&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1071" width="1" height="1"&gt;</description></item></channel></rss>