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. file upload control

file upload control

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorialquestion
3 Posts 3 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.
  • F Offline
    F Offline
    For_IT
    wrote on last edited by
    #1

    Hi all I want suggestions on following scenario 1.I have a image control on the web page. 2. I have FileUpload control 3. Button control to upload file to server When user will select a .jpg file using file upload control, I want to display that image in the image control. Once user is satisfied with the image, he will upload it to server by clicking on Button control. I have tried by implementing all events of FileUpload to refresh image control with the user selected image, but nothing worked out. can anyone pls guide me how can I refresh image control when user will select the file using file upload control. Thanks a lot.

    T 1 Reply Last reply
    0
    • F For_IT

      Hi all I want suggestions on following scenario 1.I have a image control on the web page. 2. I have FileUpload control 3. Button control to upload file to server When user will select a .jpg file using file upload control, I want to display that image in the image control. Once user is satisfied with the image, he will upload it to server by clicking on Button control. I have tried by implementing all events of FileUpload to refresh image control with the user selected image, but nothing worked out. can anyone pls guide me how can I refresh image control when user will select the file using file upload control. Thanks a lot.

      T Offline
      T Offline
      ToddHileHoffer
      wrote on last edited by
      #2

      Save the file in your website and change the src to the location you saved the file.

      how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

      E 1 Reply Last reply
      0
      • T ToddHileHoffer

        Save the file in your website and change the src to the location you saved the file.

        how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

        E Offline
        E Offline
        eggsovereasy
        wrote on last edited by
        #3

        Or if you are storing the image in a database, you'll have to make a helper page that fetches images (like GetPic.aspx?id=SOMEID), with code like this in the page_load. int id = Convert.ToInt32(Request.QueryString["id"]); MyPics pic = new MyPics(id); Response.ClearContent(); Response.ContentType = "image/jpeg"; Response.OutputStream.Write(pic.Image, 0, pic.Image.Length); Response.End(); Then after you upload the file, stick it in the database and get the id back you just set the ImageURL property of the asp image controls to "~/GetPic.aspx?id=NEWID" or whatever you called the file.

        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