W3C home > Mailing lists > Public > www-validator-css@w3.org > January 2007

RE: CSS errors when setting values with asp session variables

From: Douglas Perreault <doug@perreault.us>
Date: Mon, 15 Jan 2007 09:28:12 -0500
To: "'Roger Withnell'" <roger@upperbridge.co.uk>, <www-validator-css@w3.org>
Message-ID: <018b01c738b1$63caf240$6400a8c0@perreault.us>
Are you trying to validate by cutting & pasting your source code into the
validator? Or are you entering a URL for the validator? The validator isn't
going to be able to validate source code since no one but you as developer
and the ASP interpreter should ever see the source code. Realize that if you
enter a URL to a page, for example, www.xyz.com/test.asp and that page
contains ASP code in it, the ASP interpreter on your server will interpret
that code and return the HTML generated instead. The validator will see that
end result (as would anyone visiting your page) and not your original code.
If the generated HTML validates, then your page should validate fine this
way. However, the source code would not validate if you simply cut & paste
it into the validator.
On the other hand, if you are trying to validate the page below by using a
URL, then it may be because your syntax is incorrect. 
body{background:” & Session(“RGB”) & “}
should be 
body{background:<%=Session(“RGB”) %>}
or if you are writing the entire text in ASP then:
Response.write "body{background:" & Session(“RGB”) & "}"
If it's the latter that you are doing, then be sure your page ends in ASP so
that it is processed by the ASP interpreter. 


From: www-validator-css-request@w3.org
[mailto:www-validator-css-request@w3.org] On Behalf Of Roger Withnell
Sent: Saturday, January 13, 2007 2:25 PM
To: www-validator-css@w3.org
Subject: CSS errors when setting values with asp session variables

Within style tags in a page, I am setting properties with asp session
variables, for example: body{background:” & Session(“RGB”) & “}


With the CSS validator this gives the error:  body:  Invalid number
background parse error.


If I change the session variables to constants, (for example:
body{background: #FFFFCC}) there are no errors.


The source code with session variables and with constants are exactly the


Please advise.


Yours sincerely


Roger Withnell

Upper Bridge Enterprises LLP 

+44 1497 831019

+44 7836 749633


--------------------- End of message text

Upper Bridge Enterprises LLP, Partnership No. OC323844.
Registered office address Upper Bridge Court, Brilley, Herefordshire HR3 6HG
This email and any attachment is intended for and confidential to the 
addressee.  If you are neither the addressee nor an authorised recipient 
for the addressee please notify us of receipt, delete this message from 
your system and do not use, copy or disseminate the information in, or 
attached to it, in any way. 
Our messages are checked for viruses but please note that we do not accept 
liability for any viruses which may be transmitted in or with this message. 

Received on Monday, 15 January 2007 14:30:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:43 UTC