Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4440516
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:03:59+00:00 2026-05-21T13:03:59+00:00

I uploaded a picture and added the Url(uploadedImage.FileName) to a database. I then bound

  • 0

I uploaded a picture and added the Url(uploadedImage.FileName) to a database. I then bound a gridview to the dataBase and set the DataImageUrl field to the to the PictureUrl comumn of the database in which the uploadedImage.FileName was stored and so the image is displayed in the gridview(still struggling a bit with controlling the size).

I would just like to know how to add this image info to a session variable so that it can be displayed on a different page.
this is what I have done so far(I also added a session[“title”] which is easy as it only displays the text value on the other page).

if (e.CommandName == “addToSession”)
{

        //get the row index stored in the CommandArgument property
        int index = Convert.ToInt32(e.CommandArgument);

        //get the gridview row where the command is raised
        GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];

        //values stored in the text propert of the cells
        string title = selectedRow.Cells[1].Text;
        string pictureUrl = selectedRow.Cells[3].Text; ???????            
        //set the sesion variable ["Title"] to the title          
        Session["Title"] = title;

        //this is where i am experiencing some problems
        Session["ImageID"] = pictureUrl; ???????
        Response.Redirect("RateBook.aspx");
    }

Should I add an image button on the other page and try to bind it to the ImageField of the gridview perhaps?

regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:04:00+00:00Added an answer on May 21, 2026 at 1:04 pm

    Have took a look at the session string? I never used a grid but I think you cant do that this way… I think the grid will stream the image for you from the database. To access the same image later on without query the db again you will need to store the whole image and not just a link that is no longer valid in the session (as base64 or base128 string) and provide a url that streams the image back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just uploaded a picture from my app to facebook. The picture is uploaded
How can I apply a watermark to an uploaded picture using PHP? Example LINK:
I'm using ImageMagick to get 3 versions of an uploaded picture. The problem is
Some users does not have any profile picture uploaded. There is a way to
I want to fetch facebook profile picture programmatically and then load it as texture
I tend to rename a profile user uploaded picture to the corresponding id of
I have all my user uploaded pictures in a directory outside of the public
if pictures are uploaded using one style, how can i change the style of
I want to be sure that user uploaded files are real videos or pictures,
I uploaded my zip archive to the server and want to open .txt and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.