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

  • Home
  • SEARCH
  • 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 8781951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:26:31+00:00 2026-06-13T20:26:31+00:00

I would like to add <asp:image> from my codebehind onto the page. The user

  • 0

I would like to add <asp:image> from my codebehind onto the page. The user on my website will upload X number of pictures, and i don’t want to add the <asp:images> before the picture is uploaded.

The reason i want to add the <asp:image> is to show the user the picture which has been uploaded.

How can this be done?

I’ve seen the placeholder controller being used, but how can that be used when the variables gotta be different? For each upload the image should be added onto the site.

  • 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-06-13T20:26:34+00:00Added an answer on June 13, 2026 at 8:26 pm

    You can do that by creating a new Image object variable and then assigning its preperties properly then attaching the image to an existing object on your page.

    Image myImg = new Image();
    myImg.ImageUrl = "path_of_the_image.jpg";
    myImg.Visible = true;
    Panel1.Controls.Add(myImg);   //You can attach the image to any control on your page
    

    Or similarly:

    this.Controls.Add(myImg);     //Incase you wanted the image on your page controls
    Label1.Controls.Add(myImg);   //Incase you wanted the image to appear in a certain label
    

    However, this object will not live beyond the life of the code you execute. Meaning, you won’t be able to interact with this object later on, since it is defined after the scope of Page_Init. If you want to add this image dynamically then be able to interact with it, you should add it during the Page_Init event.

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

Sidebar

Related Questions

I would like to add an ASP:label and ASP:textbox control to a page through
I would like to add a Facebook like button to my asp.net page. I
I would like to add graphing to my User Controls in ASP.NET MVC. I
Using ASP.Net, I have a server control for which i would like to add
I would like to add up the number of line changes in an SVN
I would like to add a default value for an asp textbox that looks
I'm using ASP Master pages, and I would like to add an onkeypress event
i have added to my page an asp.net calendar control and i would like
I would like add error message to page validation in order to display it
I have a website that I would like to add more styling to. On

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.