May 18, 2009, 7:34 PM
[CLOSED] window is slow
Hi
I have window which opens on button click.
It takes more then 7 seconds.
Can you say what i am doing wrong?
button:
<ext:Button ID="Button16" runat="server" Text="Insert" Icon="Add">
<AjaxEvents><Click OnEvent="CardSelect"></Click></AjaxEvents></ext:Button>
function to open:protected void CardSelect(object sender, AjaxEventArgs e){win_card.Show(); }
window:<ext:Window ID="win_card" runat="server" Icon="User" Closable="true" Title="Contact Methods" Width="350" Height="260" Resizable="false"
BodyStyle="padding:5px;background-color:#fff;">
<Body><ext:FormLayout ID="FormLayout2" runat="server">
<ext:Anchor><ext:Panel ID="Panel12" runat="server" Header="false" Border="false">
<Body><uc3:cards ID="cardes1" runat="server" Title="Card" /></Body>
</ext:Panel></ext:Anchor>
</ext:FormLayout></Body>
<Buttons><ext:Button ID="Button8" runat="server" Text="Save" Icon="Disk">
<AjaxEvents><Click OnEvent="Button8_Click">
<EventMask ShowMask="true" Msg="Saving..." MinDelay="500" />
</Click></AjaxEvents></ext:Button>
</Buttons></ext:Window>
register file<%@ Register src="t/cards.ascx" tagname="cards" tagprefix="uc3" %>
file<%@ Control Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<script runat="server">
public string card_type{
get { return this.cbxCardType.SelectedItem.Value; }
set { this.cbxCardType.SelectedItem.Value = value; }
}
public string card_description{
get { return this.Card_Description.Text; }
set { this.Card_Description.Text = value; }
}
public string card_holder{
get { return this.Card_Holder.Text; }
set { this.Card_Holder.Text = value; }
}
public string card_company{
get { return this.CardCompany.SelectedItem.Value; }
set { this.CardCompany.SelectedItem.Value = value; }
}
public string card_number
{
get { return this.Card_Number.Text; }
set { this.Card_Number.Text = value; }
}
public string card_expiration_date
{
get { return this.Expiration_Date.Text; }
set { this.Expiration_Date.Text = value; }
}
public string card_default
{
get { return (this.Card_Default.Checked)?"1":"0"; }
set { if (value=="1")this.Card_Default.Checked=true;
else this.Card_Default.Checked = false;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Ext.IsAjaxRequest)
{
this.cbxCardType.SelectedItem.Value = "3";
this.CardCompany.SelectedItem.Value = "";
}
}
</script>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:Panel ID="Panel1" runat="server" FormGroup="true" AutoHeight="true">
<Body>
<ext:FormLayout ID="FormLayout1" runat="server">
<ext:Anchor Horizontal="100%">
<ext:Panel ID="Panel2" runat="server" Border="false" Header="false">
<Body>
<ext:FormLayout ID="FormLayout2" runat="server">
<ext:Anchor Horizontal="100%">
<ext:Panel ID="Panel11" runat="server" BodyBorder="False">
<Body>
<ext:TableLayout ID="TableLayout2" runat="server" Columns="3" StyleSpec="border:0px; margin:2px 2px 2px 2px; vertical-align:top;">
<ext:Cell><ext:Label ID="Label35" runat="server" Text="Card&nbsp;Type&nbsp;" StyleSpec="margin: 2px 0px 2px 0px; text-align:right;"></ext:Label></ext:Cell>
<ext:Cell ColSpan="2"><ext:ComboBox ID="cbxCardType" runat="server" StyleSpec="margin: 0px 0px 4px 4px;">
<Items><ext:ListItem Text="Credit Card" Value="0" />
<ext:ListItem Text="Frequent Flyer" Value="1" />
<ext:ListItem Text="Passport" Value="2" />
<ext:ListItem Text="Other" Value="3" /></Items>
</ext:ComboBox></ext:Cell>
<ext:Cell><ext:Label ID="Label6" runat="server" Text="Card Description&nbsp;" StyleSpec="margin: 2px 0px 2px 0px;"></ext:Label></ext:Cell>
<ext:Cell ColSpan="2"><ext:TextField ID="Card_Description" runat="server" StyleSpec="margin: 0px 0px 4px 4px;"/></ext:Cell>
<ext:Cell><ext:Label ID="Label7" runat="server" Text="Card Holder&nbsp;" StyleSpec="margin: 2px 0px 2px 0px;"></ext:Label></ext:Cell>
<ext:Cell ColSpan="2"><ext:TextField ID="Card_Holder" runat="server" StyleSpec="margin: 0px 0px 4px 4px;" /></ext:Cell>
<ext:Cell><ext:Label ID="Label3" runat="server" Text="Card Number&nbsp;" StyleSpec="margin: 2px 0px 2px 0px;"></ext:Label></ext:Cell>
<ext:Cell><ext:ComboBox ID="CardCompany" runat="server" StyleSpec="margin: 0px 0px 4px 4px;" Width="55px" BlankText="N/A">
<Items><ext:ListItem Text="N/A" Value="" />
<ext:ListItem Text="VI" Value="VI" />
<ext:ListItem Text="MA" Value="MA" />
<ext:ListItem Text="AC" Value="AC" />
<ext:ListItem Text="DC" Value="DC" />
<ext:ListItem Text="AX" Value="AX" />
<ext:ListItem Text="TP" Value="TP" /></Items>
</ext:ComboBox></ext:Cell>
<ext:Cell><ext:TextField ID="Card_Number" runat="server" StyleSpec="margin: 0px 4px 4px 4px;" /></ext:Cell>
<ext:Cell><ext:Label ID="Label1" runat="server" Text="Expiration&nbsp;Date&nbsp;(MM/YYYY)&nbsp;" StyleSpec="margin: 2px 0px 2px 0px;"></ext:Label></ext:Cell>
<ext:Cell ColSpan="2"><ext:TextField ID="Expiration_Date" runat="server" StyleSpec="margin: 0px 0px 4px 4px;" /></ext:Cell>
<ext:Cell><ext:Label ID="Label2" runat="server" Text="Default&nbsp;" StyleSpec="margin: 2px 0px 2px 0px;"></ext:Label></ext:Cell>
<ext:Cell ColSpan="2"><ext:Checkbox ID="Card_Default" runat="server" StyleSpec="margin: 0px 0px 4px 4px;" /></ext:Cell>
</ext:TableLayout>
</Body></ext:Panel>
</ext:Anchor>
</ext:FormLayout>
</Body>
</ext:Panel>
</ext:Anchor>
</ext:FormLayout>
</Body>
</ext:Panel>
</ext:FitLayout>