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. Opening a file form c prompt of server.

Opening a file form c prompt of server.

Scheduled Pinned Locked Moved ASP.NET
databasesysadmindockerhelp
7 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.
  • A Offline
    A Offline
    Ajeet mittal
    wrote on last edited by
    #1

    Hi, In my application I have a file which is stored in the server C:\Files Folder and the file name and type is any file.the whole path for the file is stored on the database.I show file name in gridview templete field as anchor.Now when i click on a link on one of the column of a gridview then the file from that location should open. but it shows file not found. i am writing this code to open a file <asp:TemplateField HeaderText="File Name"> <ItemTemplate> <a href='<%#DataBinder.Eval(Container.DataItem,"DocPath") %>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"DocName") %></a> </ItemTemplate> </asp:TemplateField> can any one help me. With Regards ajeet

    B C 2 Replies Last reply
    0
    • A Ajeet mittal

      Hi, In my application I have a file which is stored in the server C:\Files Folder and the file name and type is any file.the whole path for the file is stored on the database.I show file name in gridview templete field as anchor.Now when i click on a link on one of the column of a gridview then the file from that location should open. but it shows file not found. i am writing this code to open a file <asp:TemplateField HeaderText="File Name"> <ItemTemplate> <a href='<%#DataBinder.Eval(Container.DataItem,"DocPath") %>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"DocName") %></a> </ItemTemplate> </asp:TemplateField> can any one help me. With Regards ajeet

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      Are you able to access the folder from your sytem with the path path that you saved in DB?

      Cheers!! Brij

      A 1 Reply Last reply
      0
      • B Brij

        Are you able to access the folder from your sytem with the path path that you saved in DB?

        Cheers!! Brij

        A Offline
        A Offline
        Ajeet mittal
        wrote on last edited by
        #3

        Thanks for replying me. yes, the file is save by the system in c: also a record in database. when i save file in newtowk drive.its working fine. thanks ajeet

        1 Reply Last reply
        0
        • A Ajeet mittal

          Hi, In my application I have a file which is stored in the server C:\Files Folder and the file name and type is any file.the whole path for the file is stored on the database.I show file name in gridview templete field as anchor.Now when i click on a link on one of the column of a gridview then the file from that location should open. but it shows file not found. i am writing this code to open a file <asp:TemplateField HeaderText="File Name"> <ItemTemplate> <a href='<%#DataBinder.Eval(Container.DataItem,"DocPath") %>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"DocName") %></a> </ItemTemplate> </asp:TemplateField> can any one help me. With Regards ajeet

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          This is retarded. The file is stored on your server, therefore, once you deploy this app, the client will not have the web app running on their local machine, and therefore any link you create, will not work, obviously.

          Christian Graus Driven to the arms of OSX by Vista.

          A 1 Reply Last reply
          0
          • C Christian Graus

            This is retarded. The file is stored on your server, therefore, once you deploy this app, the client will not have the web app running on their local machine, and therefore any link you create, will not work, obviously.

            Christian Graus Driven to the arms of OSX by Vista.

            A Offline
            A Offline
            Ajeet mittal
            wrote on last edited by
            #5

            Thanks For Replying me. Can u tell me any alternative way. with regards ajeet

            C 1 Reply Last reply
            0
            • A Ajeet mittal

              Thanks For Replying me. Can u tell me any alternative way. with regards ajeet

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              you can put the files inside your web app and ask people to download them and run them. That's your only real option. And, again, you really should read up on ASP.NET, because you're missing some absolute basics to think otherwise.

              Christian Graus Driven to the arms of OSX by Vista.

              A 1 Reply Last reply
              0
              • C Christian Graus

                you can put the files inside your web app and ask people to download them and run them. That's your only real option. And, again, you really should read up on ASP.NET, because you're missing some absolute basics to think otherwise.

                Christian Graus Driven to the arms of OSX by Vista.

                A Offline
                A Offline
                Ajeet mittal
                wrote on last edited by
                #7

                Thanks a lot. ajeet

                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