<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1015708" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1015708</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091140</link>
    <description> &lt;p&gt;When it was writing the line it automatically entered a carriage return so after trying to use it 3 or 4 times I noticed the style.css had 3 or 4 blank lines between each line of code.&lt;/p&gt;
&lt;p&gt;I have removed the Chr(13) and it is visually exactly the same as the style.css when it&#039;s done.  It just doesn&#039;t act like it.&lt;/p&gt;
&lt;p&gt;Someone pointed out the fact that since it&#039;s being created by FSO it&#039;s possible it&#039;s not in the right format ANSI vs Unicode.  Do you know how I would ensure it&#039;s being created correctly?  And which format should I be using?&lt;/p&gt;
&lt;p&gt;Thanks for any help.&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Oct 2001 17:50:42 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091140 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091137</link>
    <description> &lt;p&gt;Try replacing the Chr(13) with VbCrLf.&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Oct 2001 16:36:28 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1091137 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091131</link>
    <description> &lt;p&gt;I have everything working!&lt;/p&gt;
&lt;p&gt;... except one thing.&lt;/p&gt;
&lt;p&gt;So far I have created the stylesheet which works great.  I can make changes through the web-based form and it is flawless.  Except for when I want to change it a 2nd time.&lt;/p&gt;
&lt;p&gt;The process I&#039;m using doesn&#039;t seem to be saving the data like I hoped.  Below you will find my source code and my troubleshooting.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;%&lt;br /&gt;Dim FSO&lt;br /&gt;Dim txtStream&lt;br /&gt;&lt;br /&gt;Set FSO = Server.CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;&lt;br /&gt;Set txtStream = FSO.OpenTextFile(Server.MapPath(&amp;quot;../style.css&amp;quot;))&lt;br /&gt;&lt;br /&gt;Image = Request.Form(&amp;quot;Image&amp;quot;)&lt;br /&gt;Font = Request.Form(&amp;quot;Font&amp;quot;)&lt;br /&gt;Size = Request.Form(&amp;quot;Size&amp;quot;)&lt;br /&gt;Weight = Request.Form(&amp;quot;Weight&amp;quot;)&lt;br /&gt;Color = Request.Form(&amp;quot;Color&amp;quot;)&lt;br /&gt;&lt;br /&gt;varNewLine = &amp;quot;{font-family: &amp;quot; &amp;amp; Font &amp;amp; &amp;quot;; font-size: &amp;quot; &amp;amp; Size &amp;amp; &amp;quot;; font-weight: &amp;quot; &amp;amp; Weight &amp;amp; &amp;quot;; color: &amp;quot; &amp;amp; Color &amp;amp; &amp;quot;; Background-Image: url(Images/&amp;quot; &amp;amp; Image &amp;amp; &amp;quot;); height: 20px;}&amp;quot;&lt;br /&gt;&lt;br /&gt;Do While Not txtStream.AtEndOfStream&lt;br /&gt;	strLine = txtStream.ReadLine&lt;br /&gt;	If strLine = &amp;quot;.Footer&amp;quot; Then&lt;br /&gt;		strNewStyle = strLine &amp;amp; Chr(13)&lt;br /&gt;			strLine = txtStream.ReadLine&lt;br /&gt;		strNewStyle = varNewLine &amp;amp; Chr(13)&lt;br /&gt;	Else&lt;br /&gt;		strNewStyle = strLine &amp;amp; Chr(13)&lt;br /&gt;	End If&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;Set NewStyle = FSO.CreateTextFile(Server.MapPath(&amp;quot;../style.css&amp;quot;))&lt;br /&gt;&lt;br /&gt;NewStyle.WriteLine (strNewStyle)&lt;br /&gt;&lt;br /&gt;NewStyle.Close&lt;br /&gt;&lt;br /&gt;Set NewStyle = Nothing&lt;br /&gt;Set txtStream = Nothing&lt;br /&gt;Set FSO = Nothing&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;The problem I&#039;m having is once it has been used once the format I&#039;m using creates the string &quot;strNewStyle&quot; but it seems to be a never ending string even though I&#039;m using Chr(13) after each line.&lt;/p&gt;
&lt;p&gt;If there is a way to create an end of each line I would appreciate your help in finding it.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Art Sapimp&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Oct 2001 06:52:05 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091131 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091129</link>
    <description> &lt;p&gt;ahhh, I see&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Oct 2001 06:10:05 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1091129 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091089</link>
    <description> &lt;p&gt;Yes, this is running on Access.  I have been working on a version for SQL but I am terrible at SQL server right now so it&#039;s doing terrible.  The traffic is next to nothing today but I&#039;m building it for a department with over 250 employees accessing this at least 2 - 3 times a day.  With this many hits at possibly close to the same time every hit into the DB is dangerous.&lt;/p&gt;
&lt;p&gt;FSO will only be used when the Admins of the site want to change the look.  Usually this would be done during the initial setup process and maybe a few times throughout the year.&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 19:04:52 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091089 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091087</link>
    <description> &lt;p&gt;I would use the common SSI file like Peter, but I would hit the DB again.&lt;/p&gt;
&lt;p&gt;It&#039;s more of a system drain to use the FSO than hit the DB (IMHO).  Just compare UBB&#039;s flat file storage to vBulletin&#039;s DB storage.&lt;/p&gt;
&lt;p&gt;Why are you so affraid to use the DB?  Are you running this site off Access?&lt;br /&gt;
How much traffic are you getting?&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 18:57:09 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1091087 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091084</link>
    <description> &lt;p&gt;It&#039;s just my opinion but I think you&#039;re making this more complex than it needs to be. Accessing the file system (FSO) is also a very resource intensive process, having an efficient stored procedure is less of a drain on a server then multiple access to the file system.&lt;/p&gt;
&lt;p&gt;It&#039;s your call, but if it was me I would create 1 ASP page that would serve as the style sheet (included at the top of every page) and pass all the style sheet variables in session or cookie objects to avoid going back to the db.&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 18:52:27 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1091084 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091083</link>
    <description> &lt;p&gt;You&#039;re right, 4 queries is nothing to worry about, but it&#039;s strain on a server that is not necessary if this is written correctly.&lt;/p&gt;
&lt;p&gt;I believe I have created a way in FSO to make the proper changes directly to the style.css file.  If this works it will also be a great tool to use in the future for other applications.&lt;/p&gt;
&lt;p&gt;Here&#039;s the idea, tell me if you think it&#039;s possible or if you know of a better way.&lt;/p&gt;
&lt;p&gt;Create control panel page where the user chooses which portion of the CSS file they want to change.  We&#039;ll assume they choose the class &quot;Header&quot;.  They then have the option of changing the font size, font family, font-weight, color, etc.  The following page once the form is submitted will open the CSS file as a text file, Replace the string starting with Header {...} and then resave it to the correct directory.&lt;/p&gt;
&lt;p&gt;Is this not a good way to do it?&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 18:40:38 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1091083 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091078</link>
    <description> &lt;p&gt;You&#039;r running 4 queries per page, or opening 4 connections per page?&lt;/p&gt;
&lt;p&gt;4 queries per page is nothing to worry about.  The time it takes to run a query is tenths or hundredths of a second.&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 18:24:55 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1091078 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/dynamic-css-asp#comment-1091072</link>
    <description> &lt;p&gt;If you&#039;re able to rely on cookies or sessions then you could always pull them from there, then if they&#039;re permanent cookies they&#039;ll have the same settings next time.&lt;/p&gt;
 </description>
     <pubDate>Fri, 05 Oct 2001 16:42:58 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1091072 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
