Feb 09, 2012, 12:39 PM
Hi,
I guess you should wrap
Here is the full example.
Example
I guess you should wrap
Me.txtName.Text = mCountry.Name
in the following conditionif (!X.IsAjaxRequest)
In a different way it's executed during DirectEvent.Here is the full example.
Example
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
this.TextField1.Text = "Initial";
}
}
protected void ShowText(object sender, DirectEventArgs e)
{
X.Msg.Alert("DirectEvent", this.TextField1.Text).Show();
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:TextField ID="TextField1" runat="server" />
<ext:Button runat="server" Text="Show Text" OnDirectClick="ShowText" />
</form>
</body>
</html>