Opening a file form c prompt of server.
-
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
-
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
-
Are you able to access the folder from your sytem with the path path that you saved in DB?
Cheers!! Brij
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
-
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
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.
-
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.
Thanks For Replying me. Can u tell me any alternative way. with regards ajeet
-
Thanks For Replying me. Can u tell me any alternative way. with regards ajeet
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.
-
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.
Thanks a lot. ajeet