I have added telerik:RadDatePicker in a gridView. Its fetching results and calender as expected. But when i am exporting to excel. I am getting error.
Server Error in '/' Application.
Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Source Error:
Line 121:
Line 122: // render the table into the htmlwriter Line 123: table.RenderControl(htw); Line 124:
Line 125: // render the htmlwriter into the response
Source File: \App_Code\GridViewExportUtil.cs Line: 123
Stack Trace:
[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.]
Telerik.Web.UI.ScriptRegistrar.GetScriptManager(Control control) +161
Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +39