Issue with Direct method called via Javascript

  1. #1

    Issue with Direct method called via Javascript

    In my cshtml file i have the following code in script section :
      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
  2. #2

    [CLOSED}Issue with Direct method called via Javascript

    I solved my problem.
    The error was the parameter name in the Javascript.
    Simone

Similar Threads

  1. Replies: 2
    Last Post: Aug 13, 2013, 9:38 AM
  2. Replies: 8
    Last Post: Jun 10, 2013, 1:06 PM
  3. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  4. Replies: 2
    Last Post: Aug 30, 2012, 9:37 PM
  5. [CLOSED] Direct Method From Javascript
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 17, 2010, 11:17 AM

Tags for this Thread

Posting Permissions