Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How can I store an image in a session variable in asp.net

How can I store an image in a session variable in asp.net

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 4260270
    wrote on last edited by
    #1

    Hi How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net Thanks Denny

    M A S 3 Replies Last reply
    0
    • M Member 4260270

      Hi How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net Thanks Denny

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      Read the image in a byte[] and assign it to the session variable.

      Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      1 Reply Last reply
      0
      • M Member 4260270

        Hi How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net Thanks Denny

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        As manash sugguested you can store image as byte array in the session variable. But why you are storing image in session variable ? Did you thing about size of session variable?

        cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net

        1 Reply Last reply
        0
        • M Member 4260270

          Hi How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net Thanks Denny

          S Offline
          S Offline
          SunithaNallana
          wrote on last edited by
          #4

          Hi, Rather than storing Image in Session variable donot u think it is good to store the image path in Session.try this way....

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups