With Ext.NET, developers have a lot of control over the submission of a <form>
element or FormPanel, even if not using the standard ASP.NET <form runat="server">
. The basic principle for manually submitting a form to the server is the Ext JS FormPanel getForm
method, which returns the underlying form manager, the BasicForm associated with the FormPanel. It has a getValues
method, which returns values as a dictionary of name/value pairs that can be submitted to the server using Ajax, for example:
<ext:Button runat="server" Text="Save"> <DirectEvents> <Click OnEvent="SaveData" Before="return #{FormPanel1}.isValid();"> <ExtraParams> <ext:Parameter Name="values" Value="#{FormPanel1}.getForm().getValues()" Mode="Raw" Encode="true" /> </ExtraParams> </Click> </DirectEvents> </ext:Button>
In the preceding code...