Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
we all know that we can transfer text values from one page to other.. I am using this method to transfer values:

// Session Created
Session["Name"] = txtName.Text; 
Response.Redirect("WebForm5.aspx");

// calling data
if(Session["Name"] != null) 
    Label3.Text = Session["Name"].ToString();


But how to transfer images..????

I am retrieving images from db using handler for a page and i want that when user clicks on a btn the image along with the data must be transferred to another page..

The above procedure don't work for images as image can't be store to string.

Thank u
Posted

1 solution

i think this will work fine here..

// stroing value
 Session["img"] = Image1.ImageUrl;
        Response.Redirect("Default3.aspx")
// calling image
if (Session["img"] != null)
        {
            Image1.ImageUrl =Session["img"].ToString();
        }


please do tell if its wrong
 
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