Hi i want to export the data present in my jQgrid in one of my asp.net web application into excel sheet i looked around the net and i find only sites that tell me how to do it for MVC application and this is not wat i want. I tried doing this but i am getting some error in my global.asax file.
i added a button in my web page and on click of it i am doing this.
protected void btnExport_Click(object sender, EventArgs e)
{
grdLateFeeConfiguration.ExportToExcel("BlockedUsers.xls");
}
and i get an exception here in my global.asax file
protected void Application_Error(object sender, EventArgs e)
{
Exception exception = Server.GetLastError();
HttpException httpException = (HttpException)exception;
int httpCode = httpException.GetHttpCode();
Application["errorInfor"] = httpCode;
}
The exception object that is returned by the Server.GetLasrError()
method is always null and i get a null pointer exception when httpException.GetHttpCode();
i dont understand wat is happening can someone explain wat is happening.