[CLOSED] Error executing child request for handler 'Ext.Net.SelfRenderingPage
The context is the same I have exposed in my past post.
n my cshtml file i have the following code in script section :
Code:
var exportExcel = function() {
App.PNLCenter.body.mask('Export');
Ext.net.DirectMethod.request({
url: "ExportExcel",
cleanRequest: true,
isUpload: true,
params: {
//data: Ext.getCmp('ComboBoxFilter').rawValue
data: App.gridAllBdg.getRowsValues()
}
});
App.PNLCenter.body.unmask();
};
in the page code i have a button deslared as shown below :
Code:
Html.X().Button()
.Text("Esporta")
.ID("Esporta")
.Handler("exportExcel()")
.Icon(Icon.PageExcel)
.Disabled(false)
.StandOut(false)
and in the controller I have the direct method declared as shown below :
Code:
public ActionResult ExportExcel(string data)
{
//Actions
Response.Close();
return this.Direct();
}
Wneh the direct method pass the control to the main page I got the error in the line of the cshtml layout invoking the ResourceManager:
Code:
@Html.X().ResourceManager().StateProvider(StateProvider.Cookie).FormID("idmv")
that says
Quote:
Error executing child request for handler 'Ext.Net.SelfRenderingPage'.
The problem seems related to the Respose.End() that is necessary to close the stream od the exported excel file.
Any suggestion?
Thanks in advance for help.
Marco