Form updates using AjaxEvent [0.8] and DirectEvent [1.0]

  1. #1

    Form updates using AjaxEvent [0.8] and DirectEvent [1.0]

    Hi,

    I am stuck with some issues in Ext.Net 1.0. The following code works in 0.8 but not in 1.0.

    Code that works in 0.8
    ------------------------------------------------------------------------------------------------

    <ext:ColumnLayout ID="ColumnLayout1" runat="server">
    <ext:LayoutColumn ColumnWidth=".5">
    <ext:TextField runat="server" ID="txtTestText" Height="200" Width="200">
    </ext:TextField>
    </ext:LayoutColumn>
    <ext:LayoutColumn ColumnWidth=".5">
    <ext:Button runat="server" Text="Button" Height="200" Width="200">
    <AjaxEvents>
    <Click OnEvent="ShowText">
    </Click>
    </AjaxEvents>
    </ext:Button>
    </ext:LayoutColumn>
    </ext:ColumnLayout>

    protected void ShowText(object sender, AjaxEventArgs e)
    {
    Ext.MessageBox.Alert("test", txtTestText.Text).Show();
    }

    ------------------------------------------------------------------------------------------------

    The same example doesn't work in 1.0

    <ext:ColumnLayout runat="server">
    <Columns>
    <ext:LayoutColumn ColumnWidth=".5">
    <ext:TextField runat="server" ID="txtTestText" Height="2" Width="200">
    </ext:TextField>
    </ext:LayoutColumn>
    <ext:LayoutColumn ColumnWidth=".5">
    <ext:Button runat="server" Text="Button" Height="2" Width="200">
    <DirectEvents>
    <Click onevent="ShowText">
    </Click>
    </DirectEvents>
    </ext:Button>
    </ext:LayoutColumn>
    </Columns>
    </ext:ColumnLayout>


    protected void ShowText(object sender, DirectEventArgs e)
    {
    X.MessageBox.Alert("test", txtTestText.Text).Show();
    }

    Form values are not updated in DirectEvent. What is the correct approach.

    Can you tell me the difference between the AjaxEvent [0.8] and DirectEvent [1.0].

    Regards,
    Shankar
  2. #2
    I missed to add form tag (<form id="Form1" runat="server">). Adding form tag fixed this issue :o

Similar Threads

  1. [CLOSED] SVN updates
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 08, 2012, 4:54 PM
  2. [CLOSED] fire the DirectEvent ONLY when form is valid
    By Fahd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 07, 2012, 2:00 PM
  3. [CLOSED] Form control values are not updated during DirectEvent
    By Mark.Cooke in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 22, 2010, 8:36 PM
  4. [CLOSED] DirectEvent form creation with panel
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 22, 2010, 4:55 PM
  5. ExtJS Updates and Coolite's Version
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 08, 2009, 4:49 PM

Posting Permissions