Dear all,
I have a problem with AJAX.Net.
Now, all my program forms use Anthem.Net. But, Anthem.Net gets problem in IE7 (dropdownlist shrunks and Anthem.Net doesn't provide date picker).
So, I have plan to convert my forms AJAX to AJAX.Net.
I have converted one modules, and when I compared AJAX.Net with Anthem.Net, It seemed that AJAX.Net is slower than Anthem.Net.
I'm affraid, if I have released my new program, I will get complains from my Users.
Does anyone know how to advance AJAX.Net speed ?
I give you the simple program to compare Anthem.Net with AJAX.Net.
I know, some one you will tell to me to use JavaScript in this program, but in my real program, sometimes I need to acces to database also.
<!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>
<title>Untitled Page</title>
</head>
<body>
<iframe src="FrmAnthemAJAX.aspx" style="width: 452px; height: 276px"></iframe>
<br />
<h1></h1>
<iframe src="frmaspnetajax.aspx" style="width: 449px; height: 198px"></iframe>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="FrmAnthemAJAX.aspx.vb" Inherits="FrmAnthemAJAX" %>
<%@ Register TagPrefix="anthem" Assembly="Anthem" Namespace="Anthem" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 276px">
<tr>
<td colspan="2">
ANTHEM.NET</td>
</tr>
<tr>
<td>
<anthem:Button ID="CmdFill" runat="server" Text="Fill" AutoUpdateAfterCallBack=true Width="50px"/></td>
<td>
<asp:TextBox ID="TxtNumber" runat="server" Width="50px">100</asp:TextBox></td>
</tr>
<tr>
<td>
</td>
<td>
<anthem:DropDownList ID="CmbNumber" runat="server" Width="155px" AutoCallBack="True" AutoUpdateAfterCallBack="True">
</anthem:DropDownList></td>
</tr>
<tr>
<td>
</td>
<td>
<anthem:Label ID="LbNumber" runat="server" AutoUpdateAfterCallBack="True" UpdateAfterCallBack="True"></anthem:Label></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Partial Class FrmAnthemAJAX
Inherits System.Web.UI.Page
Protected Sub CmdFill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmdFill.Click
Dim I As Int32
CmbNumber.Items.Clear()
For I = 1 To Val(TxtNumber.Text.Trim)
Dim NN As New ListItem
NN.Text = Trim(Str(I))
NN.Value = Trim(Str(I))
CmbNumber.Items.Add(NN)
Next
End Sub
Protected Sub CmbNumber_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbNumber.SelectedIndexChanged
LbNumber.Text = "You have selected " & CmbNumber.SelectedValue.Trim
End Sub
End Class
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="FrmASPNETAJAX.aspx.vb" Inherits="FrmASPNETAJAX" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<table style="width: 270px">
<tr>
<td colspan="2">
AJAX.NET</td>
</tr>
<tr>
<td>
<asp:Button ID="CmdFill" runat="server" Text="Fill" Width="50px"/></td>
<td>
<asp:TextBox ID="TxtNumber" runat="server" Width="50px">100</asp:TextBox></td>
</tr>
<tr>
<td>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="CmbNumber" runat="server" Width="155px" AutoPostBack=true >
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CmdFill" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="LbNumber" runat="server" ></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CmbNumber" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Partial Class FrmASPNETAJAX
Inherits System.Web.UI.Page
Protected Sub CmdFill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmdFill.Click
Dim I As Int32
CmbNumber.Items.Clear()
For I = 1 To Val(TxtNumber.Text.Trim)
Dim NN As New ListItem
NN.Text = Trim(Str(I))
NN.Value = Trim(Str(I))
CmbNumber.Items.Add(NN)
Next
End Sub
Protected Sub CmbNumber_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CmbNumber.SelectedIndexChanged
LbNumber.Text = "You have selected " & CmbNumber.SelectedValue.Trim
End Sub
End Class
Thanks.