Click here to Skip to main content
15,887,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a table College under which many College Name and Images are stored for different colleges

Now,
How to assign images to session variables?

On each search images will change.

Thanks
Posted
Comments
R. Giskard Reventlov 19-Apr-12 17:04pm    
Your question is not entirely clear. Do you mean to store actual image in a session variable or data related to the image and why? I'll post an answer that may help below.

1 solution

Simplistic code example:

C#
Session["image"] = db.GetImage(ByIndex);

Image image = (Image)Session["image"];


There are other ways to do this as well but this should get you started.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900