Response.ContentType = "application/ms-excel"; Response.AddHeader("content-disposition", "inline; file1.xls"); Response.WriteFile(randomFileName); If(user clicked cancel) { // Do nothing } else if (user clicked save) { // write to a database }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)