I have created a gridView, which contains link buttons with the names. In the Code Behind file, i wrote following code for download option.
protected void gridview_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Download")
{
String x = "~/Nike_folder/MSR/" + e.CommandArgument.ToString();
string FName = Server.MapPath(x);
Response.Clear();
Response.ContentType = "application/*.*";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + FName);
Response.TransmitFile(FName);
Response.End();
}
}
Once user click on any link, browser window will open and ask for open or save or cancel.
I would like to find out whether the user clicks on Open or save.
Is there any way to find this out?