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 Image to Image Control at run time in ASP.NET

How to assign Image to Image Control at run time in ASP.NET

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorialquestion
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

    IF I WANT TO ASSIGN AN IMAGE FROM SOME OTHER LOCATION TO IMAGE CONTROL IN ASP.NET. THEN HOW TO DO THIS? SUPPOSE, MY APPLICATION IS IN C: and I WANT TO ASSIGN AN IMAGE FROM D:, HOW TO DO THIS. SHOULD I USE FILE.COPY or WHAT? PLEASE HELP ME.

    N A 2 Replies Last reply
    0
    • S salman_syed_01

      IF I WANT TO ASSIGN AN IMAGE FROM SOME OTHER LOCATION TO IMAGE CONTROL IN ASP.NET. THEN HOW TO DO THIS? SUPPOSE, MY APPLICATION IS IN C: and I WANT TO ASSIGN AN IMAGE FROM D:, HOW TO DO THIS. SHOULD I USE FILE.COPY or WHAT? PLEASE HELP ME.

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      salman_syed_01 wrote:

      SUPPOSE, MY APPLICATION IS IN C: and I WANT TO ASSIGN AN IMAGE FROM D:, HOW TO DO THIS.

      You can't. It might work on a local machine, but not on a server. ASP.NET can access only the website area and not your C and D drives.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      1 Reply Last reply
      0
      • S salman_syed_01

        IF I WANT TO ASSIGN AN IMAGE FROM SOME OTHER LOCATION TO IMAGE CONTROL IN ASP.NET. THEN HOW TO DO THIS? SUPPOSE, MY APPLICATION IS IN C: and I WANT TO ASSIGN AN IMAGE FROM D:, HOW TO DO THIS. SHOULD I USE FILE.COPY or WHAT? PLEASE HELP ME.

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        You asked this already. Didn't you like the correct answer? Once again, a web application can only access files in its own directory structure, it CANNOT access other drives. This is a basic security concept.

        Bob Ashfield Consultants Ltd

        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