By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

Remember theme on session timeouts

P: n/a
(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

May 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> 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.
An easier eway would be to create a simple ihttpmodule that inserts a hidden
field into each returned web page identifying the theme in the EndRequest
event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

--
Regards

John Timney
Microsoft MVP

"M O J O" <na@na.na> wrote in message
news:up**************@TK2MSFTNGP05.phx.gbl... (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

May 23 '06 #2

P: n/a
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:
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.


An easier eway would be to create a simple ihttpmodule that inserts a hidden
field into each returned web page identifying the theme in the EndRequest
event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

May 23 '06 #3

P: n/a
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

--
Regards

John Timney
Microsoft MVP

"M O J O" <na@na.na> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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:
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.


An easier eway would be to create a simple ihttpmodule that inserts a
hidden field into each returned web page identifying the theme in the
EndRequest event. Something like this would help you get started.

http://www.devx.com/dotnet/Article/6962/0/page/4

May 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.