Load Random Background Image on Session

Topics: Customizing Orchard
Jan 15, 2015 at 4:22 PM
Edited Jan 15, 2015 at 4:59 PM
I would like to tie into the user session and load a random banner image per session. Supposedly you could do this with jQuery by creating a session cookie with the image name as the value. You can then use that cookie to get the name and then load that image on each page as the banner. If a new session is started then you can create a new cookie with a random image. Is there a way of doing this in C# and Orchard instead?

Edit: I need to be able to have this work for all visitors to the site not just authenticated ones