exportPage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="exportPage.aspx.cs" Inherits="_Default" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="exportPage.aspx.cs" Inherits="_Default" %>
Export to excel using jquery
exportPage.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void lnkExport_Click(object sender, EventArgs e)
{
string data = Request.Form["data"];
data = HttpUtility.UrlDecode(data);
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=report.xls");
Response.Charset = "";
Response.ContentType = "application/excel";
HttpContext.Current.Response.Write(data);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
}
}
Tag:- Export To Excel,Export to Excel in Asp.net,Export Html Content,Export to Excel in .Net,Jquery Export To Excel,Asp.net Export To Excel,Export To PDF
No comments:
Post a Comment