I cannot submit my form using AJAX

Issue

When using the ASP.NET AJAX Toolkit in your web form, you might experience issues submitting your web form either by using the SubmitButton or by manually triggering SubmitToWorkflow().

Details

AJAX-type web forms will internally submit the event trigger without actually performing a postback if the .NET control is encapsulated by an AJAX UpdatePanel. When submitting a WorkflowGen form, you are leaving the form and returning the data to the WorkflowGen engine. This requires a real postback, so you must register both the Submit and Save As Draft buttons as postback triggers.

Postback triggers are also required for WorkflowFileUpload controls, and GridView controls that make use of the CalendarPopup control for one or more inputs.

You can register the postback triggers either in the Page_Load event or directly in the ASPX page.

To do this in the Page_Load event:

Add the following .NET code for each of the above controls:

ScriptManager.GetCurrent(this).RegisterPostBackControl(MyControlID);

To do this in the ASPX page:

  1. Add the <Triggers> element to the UpdatePanel.

  2. Add <asp:PostBackTrigger ControlID="MyControlID" /> to the element for each of the controls that requires postback triggers.