Feb 20, 2015, 6:49 PM
Issue with Direct method called via Javascript
In my cshtml file i have the following code in script section :
Thanks in advance for help.
Simone
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 : 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 : public ActionResult ExportExcel(string data)
{
return this.Direct();
}
Why when I press the button the direct method of the controller is noy invoked?Thanks in advance for help.
Simone