T
Troy Donavan
I'm trying to get a partial page (Ajax style) update when the selection of a
DropDownList changes. I'm not having much luck. I will continue plugging
away at the sample applications in hopes of finding some hints, but
meanwhile, if someone could point out to me what I am doing wrong, I would
appreciate it. Here is a page with three controls on it. They are for
selection of Country, State and Locality. The idea is that when one chooses
the country, the possible selections for state (region) would then update and
similarly for localities.
Let me know if you can spot my problem. Here is the code:
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.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" />
<div>
<asp:UpdatePanel ID="UPCountry" runat="server">
<ContentTemplate>
<aspropDownList ID="DDCountry" runat="server"
style="z-index: 100; left: 500px; position: absolute; top: 100px; width:
200px" OnLoad="DDCountry_Load">
</aspropDownList>
<aspropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH:
200px; POSITION: absolute; TOP: 130px" id="DDState" runat="server"
OnLoad="DDState_Load">
</aspropDownList>
<aspropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH:
200px; POSITION: absolute; TOP: 160px" id="DDLocality" runat="server"
OnLoad="DDLocality_Load">
</aspropDownList>
</ContentTemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="DDState"
EventName="TextChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="DDCountry"
EventName="TextChanged"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
DropDownList changes. I'm not having much luck. I will continue plugging
away at the sample applications in hopes of finding some hints, but
meanwhile, if someone could point out to me what I am doing wrong, I would
appreciate it. Here is a page with three controls on it. They are for
selection of Country, State and Locality. The idea is that when one chooses
the country, the possible selections for state (region) would then update and
similarly for localities.
Let me know if you can spot my problem. Here is the code:
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.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" />
<div>
<asp:UpdatePanel ID="UPCountry" runat="server">
<ContentTemplate>
<aspropDownList ID="DDCountry" runat="server"
style="z-index: 100; left: 500px; position: absolute; top: 100px; width:
200px" OnLoad="DDCountry_Load">
</aspropDownList>
<aspropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH:
200px; POSITION: absolute; TOP: 130px" id="DDState" runat="server"
OnLoad="DDState_Load">
</aspropDownList>
<aspropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH:
200px; POSITION: absolute; TOP: 160px" id="DDLocality" runat="server"
OnLoad="DDLocality_Load">
</aspropDownList>
</ContentTemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="DDState"
EventName="TextChanged"></asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="DDCountry"
EventName="TextChanged"></asp:AsyncPostBackTrigger>
</triggers>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>