Sep 02, 2008, 3:54 PM
[FIXED] [V0.7] UpdatePanel
Hello,
The following is a simple example of a ComboBox inside an UpdatePanel which fails in IE6 and FF3.0:
Example.aspx:
Cheers,
Timothy
The following is a simple example of a ComboBox inside an UpdatePanel which fails in IE6 and FF3.0:
Example.aspx:
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
BindCountries();
}
public void BindCountries()
{
Countries.DataSource = new object[]
{
new object[]{"AL", "Alabama", "The Heart of Dixie"},
new object[] {"AK", "Alaska", "The Land of the Midnight Sun"},
new object[] {"AZ", "Arizona", "The Grand Canyon State"},
new object[] {"AR", "Arkansas", "The Natural State"},
};
Countries.DataBind();
}
protected void drpCountry_ItemChanged(object sender, EventArgs e)
{
lblSelected.Text = "Selected: " + drpCountry.SelectedItem.Value;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" EnablePartialRendering="True" />
<ext:ScriptManager runat="server" StateProvider="PostBack" Theme="Gray" />
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ext:Store ID="Countries" runat="server" AutoLoad="True">
<Reader>
<ext:ArrayReader ReaderID="Abbrev">
<Fields>
<ext:RecordField Name="Abbrev" />
<ext:RecordField Name="DisplayName" />
<ext:RecordField Name="Description" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
<ext:ComboBox ID="drpCountry" runat="server" AutoPostBack="True" OnItemChanged="drpCountry_ItemChanged" StoreID="Countries" DisplayField="DisplayName" ValueField="Abbrev" Editable="False" EmptyText="----" ForceSelection="True" Mode="Local" TypeAhead="False" Selectonfocus="True" Stateful="True" TriggerAction="All" Width="255" />
<asp:Label ID="lblSelected" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Fails when you use EnablePartialRendering="True" on the UpdatePanel. Works when you set EnablePartialRendering to False ;)Cheers,
Timothy