AJAX呼叫成功

So, I have two JavaScript functions:

function Generate() {
  //Do something
  $.ajax({data:{Svc: 'cpMain',
                Cmd: 'Generate'
               },
     dataType: "text",
     context: this,
     success: genSuccess()
   });
}

function genSuccess() {
  //Do something
}

and in my c#, on Page_Init() I pick up the parameters from my AJAX callback to do something.

I want the order to be Generate(), callback, genSuccess(). But the order in which this is running is Generate(), genSuccess(), callback.

Am I missing something?

Provide the function reference of genSuccess to success, and not the return value of a call to genSuccess

success: genSuccess