开发者

Editing different types of files from gridview

I have a gridview with coloumns ID, filename, type, date & time and view. There is one fileupload control which uploads the file from computer to some folder n开发者_开发百科amed abc. From this folder the filenames are copied to the database table and they are displayed in the gridview. There is one view column in the gridview which when clicked opens the files (.doc, .xlsx,.pptx etc). But these opened files are not not editable. They can just be viewed. My question is, is there any option where I can edit these documents and store back to the same abc folder-> database table -> gridview?


Your users will need read/write access to the abc folder. I assume you are opening the documents via a process.start(filespec). Just make sure the filespec is pointing to the location in the abc directory and the users should be able to edit and default save in that location.

If that is what you are currently doing, I would check the access rights to the abc directory and make sure the user has read/write access.


I used Decker's idea and now my code is working. I used the code below and enabled selected event in gridview

using System.Diagnostics;
using System.ComponentModel;
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
    GridViewRow row = GridView1.SelectedRow;

    string Datalink = row.Cells[2].Text;
    string myPath = @"C:\Users\abc\" + Datalink;
    Process prc = new Process();
    prc.StartInfo.FileName = myPath;
    prc.Start();
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜