Loading Images based on setting

Winston

Junior Contributor
Joined
Jan 25, 2003
Messages
266
Location
Sydney, Australia
Hey guys, i'm still a n00b in ASP.NET basically i want my site to have different colour schemes. So essentially i'll be just saving a cookie storing the index of the chosen colour scheme by the user.

First question, is there a function that loads/reads a cookie from the user in ASP.NET?

Second question, how would i code it so that it loads different images based on the selected colour scheme?

Thanks.
 
Dim cookie as New HttpCookie("websitename")
cookie.Value = "color scheme"

Response.Cookies.Add(cookie)

For changing the scheme I would use CSS. Give the images ID's and the wrapper tag (whether it be table or body or what not) and change the image src attribute depending on that tag.
 
Hmmmm how would i check if a cookie exist first?

And i'm not sure how to implement your suggestion, so name the images accordingly based on ID's?
 
Back
Top