AJAX Mode

Custom ASPX forms in AJAX mode

If you're developing a custom ASPX form in AJAX mode, do the following:
    1.
    In the <form runat="server"> element, add a ScriptManager at the beginning of the form and wrap all the form content in the contenttemplate of an UpdatePanel.
    📌 Example
    1
    <form id="form1" name="form1" runat="server">
    2
    <asp:scriptmanager id="ScriptManager1" runat="server"></asp:scriptmanager>
    3
    <asp:updatepanel id="UpdatePanel1" runat="server">
    4
    <contenttemplate>
    5
    ... form content ...
    6
    </contenttemplate>
    7
    </asp:updatepanel>
    8
    </form>
    Copied!
    2.
    Since standard FileUpload controls are not supported inside the UpdatePanel, use the custom WorkflowFileUpload user control for your attachment needs.
    3.
    Add the following line in the page constructor to prevent an issue that can occur when updating a row in a GridView:
    1
    this.UseClientSideOptimization = false;
    Copied!
    You will see no difference at runtime, since all this does is prevent a postback when clicking the Update button and the validation fails. The UpdatePanel already prevents postback.
    4.
    Register the postback triggers either in the Page_Load event or directly in the ASPX page.
Last modified 9mo ago
Copy link