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. Image preview

Image preview

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
5 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.
  • R Offline
    R Offline
    Rijz
    wrote on last edited by
    #1

    I am displaying a preview of the Image before uploading it to the server. This works fine with IE6, but not working with newer versions. The previewing is achieved using an aspx page which has an asp:image control. I set the ImageURL property to the "file from the physical location". But in IE7's case, the ImageURL property does not display "file from the physical location". for instance: <asp:image id ="imgPreview" ImageUrl="file:///D:\image1.jpg"> Kindly provide any help. Thanks in advance. Regards, Rijz

    A 1 Reply Last reply
    0
    • R Rijz

      I am displaying a preview of the Image before uploading it to the server. This works fine with IE6, but not working with newer versions. The previewing is achieved using an aspx page which has an asp:image control. I set the ImageURL property to the "file from the physical location". But in IE7's case, the ImageURL property does not display "file from the physical location". for instance: <asp:image id ="imgPreview" ImageUrl="file:///D:\image1.jpg"> Kindly provide any help. Thanks in advance. Regards, Rijz

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Please change the file path from UNC to Virtual. It will then work. Client site should have permission to show the image directly. :thumbsup:

      Abhishek Sur My Latest Articles Working with Excel using MDAC
      Basics on LINQ and Lambda Expressions
      Create .NET Templates

      R 1 Reply Last reply
      0
      • A Abhishek Sur

        Please change the file path from UNC to Virtual. It will then work. Client site should have permission to show the image directly. :thumbsup:

        Abhishek Sur My Latest Articles Working with Excel using MDAC
        Basics on LINQ and Lambda Expressions
        Create .NET Templates

        R Offline
        R Offline
        Rijz
        wrote on last edited by
        #3

        Thanks for your reply Abhishek.. I cannot use a Virtual path here because, this path is obtained from a browse button text field. The user will be selecting file from any physical location on the disc and my program is supposed to preview it. It is working fine with IE6... but not in IE7 :( How can I achieve this? Thanks Rijesh

        E 1 Reply Last reply
        0
        • R Rijz

          Thanks for your reply Abhishek.. I cannot use a Virtual path here because, this path is obtained from a browse button text field. The user will be selecting file from any physical location on the disc and my program is supposed to preview it. It is working fine with IE6... but not in IE7 :( How can I achieve this? Thanks Rijesh

          E Offline
          E Offline
          Enver Maroshi
          wrote on last edited by
          #4

          I guess it's not working in FF also :) This is normal behavior, in IE6 this is security problem. Unless user uploaded something to page, neither JS or ASP should be able to access any information of that file. All new browsers in FileUpload html element don't anymore show file path, instead only file name. I think you will have to do it without preview.

          R 1 Reply Last reply
          0
          • E Enver Maroshi

            I guess it's not working in FF also :) This is normal behavior, in IE6 this is security problem. Unless user uploaded something to page, neither JS or ASP should be able to access any information of that file. All new browsers in FileUpload html element don't anymore show file path, instead only file name. I think you will have to do it without preview.

            R Offline
            R Offline
            Rijz
            wrote on last edited by
            #5

            ohhh.. :( :( :( Anyway thanks enver for your help...

            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