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. Linking a document (not residing in web directory) to hyperlink

Linking a document (not residing in web directory) to hyperlink

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 2 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.
  • P Offline
    P Offline
    Pankaj Chamria
    wrote on last edited by
    #1

    Hi, I have a requirement where I have a folder on local hard-drive containing many .pdf files. Now I want to have a Hyperlink control point to this path of hard-drive folder and upon clicking on it the the pdf file should open in the browser. The file path is say: C:/DocumentUpload/abc.pdf I apply this to the url of hyperlink but it does not work. On mouse over the url shows: file:///C:/DocumentUpload/abc.pdf It will however work if i place the file in my web directory and just apply the filename "abc.pdf" to the url. Then the hyperlink on mouse over shows http://localhost/mydomain/abc.pdf How can I have my files in C:/DocumentUpload/ and still make it work using hyperlink. Or is there some other alternative. NOTE: I positively cannot place the files in web directory folder.!! Any help is eagerly awaited!

    Pankaj Chamria, Software Programmer.

    M 1 Reply Last reply
    0
    • P Pankaj Chamria

      Hi, I have a requirement where I have a folder on local hard-drive containing many .pdf files. Now I want to have a Hyperlink control point to this path of hard-drive folder and upon clicking on it the the pdf file should open in the browser. The file path is say: C:/DocumentUpload/abc.pdf I apply this to the url of hyperlink but it does not work. On mouse over the url shows: file:///C:/DocumentUpload/abc.pdf It will however work if i place the file in my web directory and just apply the filename "abc.pdf" to the url. Then the hyperlink on mouse over shows http://localhost/mydomain/abc.pdf How can I have my files in C:/DocumentUpload/ and still make it work using hyperlink. Or is there some other alternative. NOTE: I positively cannot place the files in web directory folder.!! Any help is eagerly awaited!

      Pankaj Chamria, Software Programmer.

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      Pankaj C wrote:

      NOTE: I positively cannot place the files in web directory folder.!!

      - Use IE - Add your website in the trust site. then, I think it will work.. but it's not good practice for public site.

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

      P 1 Reply Last reply
      0
      • M Michael Sync

        Pankaj C wrote:

        NOTE: I positively cannot place the files in web directory folder.!!

        - Use IE - Add your website in the trust site. then, I think it will work.. but it's not good practice for public site.

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

        P Offline
        P Offline
        Pankaj Chamria
        wrote on last edited by
        #3

        Tks for the reply Michael. I tried your suggestion but it is behaving still in the same manner. I think for a hyperlink only http://.... type of urls work. I guess a url like c:/DocumentUpload is not identified by the explorer. Anyone with any other suggestions, pl lemme know!

        Pankaj Chamria, Software Programmer.

        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