嗨,我想将我的 jQgrid 中的一个 asp.net Web 应用程序中的数据导出到 excel 表中. 我尝试这样做,但我的 global.asax 文件中出现了一些错误。
我在我的网页中添加了一个按钮,点击它我正在这样做。
protected void btnExport_Click(object sender, EventArgs e)
{
grdLateFeeConfiguration.ExportToExcel("BlockedUsers.xls");
}
我的 global.asax 文件中出现异常
protected void Application_Error(object sender, EventArgs e)
{
Exception exception = Server.GetLastError();
HttpException httpException = (HttpException)exception;
int httpCode = httpException.GetHttpCode();
Application["errorInfor"] = httpCode;
}
该Server.GetLasrError()
方法返回的异常对象始终为空,当httpException.GetHttpCode();
我不明白 wat 正在发生时,我得到一个空指针异常,有人可以解释 wat 正在发生吗。