User dependant css

E

Eje

I am developing a webapplication for a company holding
stocks for a number of customer companies. The customers
can order parts via this new appliction. My application
is linked to each of the customers' home pages. I want
each user to 'believe' he still is in his company's pages
by changing logo and i.e. backcolor depending on company.
A person from company A will see his company's logo and
colors and a person from company B will simultanously see
his company's logo and colors. Can I achieve this with
css. In that case How? Or is there another better method.

Hope you can help me.

Eje
 
D

Dave Anderson

Eje said:
I am developing a webapplication for a company holding
stocks for a number of customer companies. The customers
can order parts via this new appliction. My application
is linked to each of the customers' home pages. I want
each user to 'believe' he still is in his company's pages
by changing logo and i.e. backcolor depending on company.
A person from company A will see his company's logo and
colors and a person from company B will simultanously see
his company's logo and colors. Can I achieve this with
css. In that case How? Or is there another better method.

It is certainly possible to do this:

<LINK REL="stylesheet"
TYPE="text/css"
HREF="myCSS.asp?Company=A">

Your script could either assign the CSS on the fly or redirect to a static
version:

[JScript example of redirection]
switch(Request.QueryString("Company").Item) {
case "A" : Response.Redirect("Company_A.css"); break
...
default : Response.Redirect("Default.css")
}


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
J

John

I presume every company have a ID, i use for my application the VAT number.
I a folder a place all the .css files and when starting the application i
load the corresponding filename into a session variable and then use it in
every page as below

Response.Write "<link rel=""stylesheet"" type=""text/css"" href=" &
session("css") & ">" & vbCrLf
 
J

John

Exemple
company 1 : vat nr 123456789, the css file is /css/123456789.css
company 2 : vat nr 826242656, the css file is /css/826242656.css

so the session variable will be for the second company: /css/826242656.css
 
G

Guest

John and Dave,

Thanks for your help. I understand the meaning and will
use your suggestions.

Eje
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top