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. How to Assign an image to Image control at Run time in ASP.NET

How to Assign an image to Image control at Run time in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
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.
  • S Offline
    S Offline
    salman_syed_01
    wrote on last edited by
    #1

    plz help me in this : Image.ImageUrl = GetImagePathFromDB(); // D:/Images/box/1.jpg My Web application resides in C:/ directory and i want to assign the image at run time from D:/ as give the path. how to assign this 01.jpg at run time using the above code. This is not working. Please help me , this is urgent.

    R M 2 Replies Last reply
    0
    • S salman_syed_01

      plz help me in this : Image.ImageUrl = GetImagePathFromDB(); // D:/Images/box/1.jpg My Web application resides in C:/ directory and i want to assign the image at run time from D:/ as give the path. how to assign this 01.jpg at run time using the above code. This is not working. Please help me , this is urgent.

      R Offline
      R Offline
      Rocky
      wrote on last edited by
      #2

      the image u try to assign to the image control must be within some directory of ur application. It goes to show that ur lacking the basic concepts of how a web application works. You gotta understand that its not a desktop app that u can access virtually anything on ur whole PC.

      Rocky My Blog

      1 Reply Last reply
      0
      • S salman_syed_01

        plz help me in this : Image.ImageUrl = GetImagePathFromDB(); // D:/Images/box/1.jpg My Web application resides in C:/ directory and i want to assign the image at run time from D:/ as give the path. how to assign this 01.jpg at run time using the above code. This is not working. Please help me , this is urgent.

        M Offline
        M Offline
        Mohammad Al Hoss
        wrote on last edited by
        #3

        Copy the images to your application directory then use ~/Imagefolder/imagename. "~/" will take you to the root directory of your application.

        Mohammad Al Hoss Development To Me Is A Pleasure more than a Job

        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