Jul 25, 2010, 12:24 PM
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
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