下载保存在上述目录中的文件时出现此错误Could not find a part of the path 'c:\users\mehdi\documents\visual studio 2012\Projects\Grid\Grid\Data Files\'.
。下载代码为:
protected void LinkButton1_Click(object sender, EventArgs e)
{
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = GridView1.DataKeys[gvrow.RowIndex].Value.ToString();
Response.TransmitFile(Server.MapPath("~/Data Files/"));
Response.End();
}
请帮忙..