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

how to store and retrieve image using session?

P: 2
i am having image in one page and i need to retrieve it on another page. how can i do tat? pls anyone help me... its urgent!!! thanks in advance.
Feb 20 '13 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,382
This is not a code writing service but if you post the code you tried along with a description of the problem with the code, we can help guide you to an answer.

As a hint, store the path to the image in a session variable and then retrieve it on the other page.
Feb 20 '13 #2

P: 2
i have written this code where i have the image(first page):

Protected Sub Button17_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button17.Click
path = "~/proj pics 527/congratulations/imagesCA3HVJ8Y.jpg"
Session("name") = path
Server.Transfer("send.aspx")
End Sub

And in the retrieving page i have given this code:

Partial Class send
Inherits System.Web.UI.Page

Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
Image1.ImageUrl = Session("name")
End Sub
End Class


but nothing is working and it is not showing any error also. can you please help me?
Feb 21 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.