> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/vs-web-forms-fr/mode-ajax.md).

# Mode AJAX

## Formulaires ASPX personnalisés en mode AJAX

Si vous développez un formulaire ASPX personnalisé en mode AJAX, procédez comme suit :

1. Dans l'élément `<form runat="server"`, ajoutez un `ScriptManager` au début du formulaire et encapsulez tout le contenu du formulaire dans le `contenttemplate` d'un `UpdatePanel`.<br>

   📌 **Exemple**

   ```markup
   <form id="form1" name="form1" runat="server">
       <asp:scriptmanager id="ScriptManager1" runat="server"></asp:scriptmanager>
       <asp:updatepanel id="UpdatePanel1" runat="server">
           <contenttemplate>
               ... contenu du formulaire ...
           </contenttemplate>
       </asp:updatepanel>
   </form>
   ```
2. Étant donné que les contrôles `FileUpload` standard ne sont pas supportés dans le `UpdatePanel`, utilisez le contrôle `WorkflowFileUpload` pour vos besoins en pièces jointes.<br>
3. Ajoutez la ligne suivante dans le constructeur de page pour éviter un problème pouvant survenir lors de la mise à jour d'une ligne dans un GridView :

   ```
    this.UseClientSideOptimization = false;
   ```

   Vous ne verrez aucune différence au moment de l'exécution mais cela permet d'empêcher un évènement de `postback` lorsque vous cliquez sur le bouton **Mettre à jour** et que la validation échoue. Le `UpdatePanel` empêche déjà l'évènement de `postback`.<br>
4. Enregistrez les déclencheurs de `postback` dans l'événement **Page\_Load** ou directement dans la page **ASPX** pour chacun de vos contrôles qui effectue un `postback` ou `une soumission vers WorkflowGen`.<br>

   Pour ce faire dans l'évènement **Page\_Load**:

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

   \
   Pour ce faire dans la page **ASPX**:

   1. Ajouter un élément `<Triggers>` dans le `UpdatePanel`.
   2. Ajouter un élément `<asp:PostBackTrigger ControlID="MyControlID" />` pour chacun des contrôles nécessitant un déclenchement de `postback`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.workflowgen.com/vs-web-forms-fr/mode-ajax.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
