Hello All,
I am having a bit of trouble opening a file in my ASP.Net/C# Application.
I have a file Path and name stored in my Database. I display that filename in a Gridview control. I also have a Button next to the File name that i use to open the file in notepad. Here is that code.
as you can see I am using the SelectIndexChan ged Event to get the file name of the current row selected.
Now this works great on my Local application and having the file itself on my Local PC. But when I have a file stored on the Server and the application residing on the server I am unable to open the file. Notepad will not even open.
Any Ideas?
I am having a bit of trouble opening a file in my ASP.Net/C# Application.
I have a file Path and name stored in my Database. I display that filename in a Gridview control. I also have a Button next to the File name that i use to open the file in notepad. Here is that code.
Code:
protected void gvHistoryRecent_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = gvEquipmentHistoryRecent.SelectedRow; Datalink = row.Cells[12].Text; System.Diagnostics.Process.Start(@"C:\windows\system32\notepad.exe", Datalink); }
Now this works great on my Local application and having the file itself on my Local PC. But when I have a file stored on the Server and the application residing on the server I am unable to open the file. Notepad will not even open.
Any Ideas?
Comment