Aspose.Cells.GridWeb.Examples.CSharp.GridWebBasics.ApplyTabBarStyle.GridWeb1_SaveCommand C# (CSharp) Метод

GridWeb1_SaveCommand() защищенный Метод

protected GridWeb1_SaveCommand ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void
        protected void GridWeb1_SaveCommand(object sender, EventArgs e)
        {
            // Generates a temporary file name.
            string filename = Session.SessionID + "_out.xls";

            string path = (this.Master as Site).GetDataDir() + "\\GridWebBasics\\";

            // Saves to the file.
            this.GridWeb1.SaveToExcelFile(path + filename);

            // Sents the file to browser.
            Response.ContentType = "application/vnd.ms-excel";
            Response.AddHeader("content-disposition", "attachment; filename=" + filename);
            Response.WriteFile(path + filename);
            Response.End();      
        }