public void export_attendence()
{
string attachment = "attachment; filename=Student_attendence_Report.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
/* Confirms that an HtmlForm control is rendered for the specified ASP.NET
server control at run time. */
}
<%@ Page Title="" Language="C#" MasterPageFile="~/vShksha.master" AutoEventWireup="true" CodeFile="expense_details.aspx.cs" Inherits="expense_details" EnableEventValidation="false" %>
{
string attachment = "attachment; filename=Student_attendence_Report.xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
/* Confirms that an HtmlForm control is rendered for the specified ASP.NET
server control at run time. */
}
<%@ Page Title="" Language="C#" MasterPageFile="~/vShksha.master" AutoEventWireup="true" CodeFile="expense_details.aspx.cs" Inherits="expense_details" EnableEventValidation="false" %>
No comments:
Post a Comment