Remember theme on session timeouts

  • Thread starter Thread starter M O J O
  • Start date Start date
M

M O J O

(using asp.net 2.0)

Hi,

I have 5-6 large customers each using the same pages, but with their own
themes.

To enter my site, they all have their own urls like ...

http://mysite.com?site=customer1
http://mysite.com?site=customer2
http://mysite.com?site=customer3
and so on.

When they start a session, I test for the site querystring and sets the
theme accordingly. I store their theme in a session variable.

My problem is, when their session times out, I can't tell what theme
they should see.

I can't use cookies to store their theme, because of security/privacy
reasons. Therefore I can't use profiles.

My idea was to add a "site=customerX" to all my urls, but I need a
simple way to add this querystring to all my rendered urls.

Is there a more simple way?

Do you have a better suggestion how to solve this?

Thanks in advance!!!

Mojo
 
Hi John,

Thanks for helping me out here!!

The only problem I see with your solution is, if my customer bookmarks
my page, then when he returns, my app doesn't know what theme to use.

I need to put a "?site=xxx" in all the links in my pages. Can this be
archived easily?

Thanks again!!

Mojo

John Timney ( MVP ) skrev:
 
It could be achieved using the same approach, as you have access to the
stream of the response from within an ihttpmodule and you can manipulate it.
If you regexpr the links out from the stream body you could add the param
you seek to any found links. Of course you have to consider any high
traffic sites as needing load testing under this approach as its an extra
hit to the reponse.

Read this: Its about response.filter
http://www.devx.com/vb2themax/Article/19901/0/page/2
 
Back
Top