|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
AJAX.NET triggers don't firecountry is selected the selections for state would be updated and similarly for state, when a state is selected the selections for city would be updated. Unfortunately, none of the triggers are firing. Any idea why? Here is the code in a page with three DropDownList controls. <%@ Page Language="VB" MasterPageFile="~/TasiAsp.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %> <asp:Content ID="ContentLogIn" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:UpdatePanel ID="UPCountry" runat="server"> <ContentTemplate> <asp:DropDownList ID="DDCountry" runat="server" style="z-index: 100; left: 500px; position: absolute; top: 100px; width: 200"> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UPState" runat="server"> <ContentTemplate> <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: absolute; TOP: 130px" id="DDState" runat="server" __designer:wfdid="w4"> </asp:DropDownList> </ContentTemplate> <triggers> <asp:AsyncPostBackTrigger ControlID="DDCountry" EventName="TextChanged"></asp:AsyncPostBackTrigger> </triggers> </asp:UpdatePanel> <asp:UpdatePanel ID="UPLocality" runat="server"> <ContentTemplate> <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: absolute; TOP: 160px" id="DDLocality" runat="server" __designer:wfdid="w5"> </asp:DropDownList> </ContentTemplate> <triggers> <asp:AsyncPostBackTrigger ControlID="DDState" EventName="TextChanged"></asp:AsyncPostBackTrigger> <asp:AsyncPostBackTrigger ControlID="DDCountry" EventName="TextChanged"></asp:AsyncPostBackTrigger> </triggers> </asp:UpdatePanel> </asp:Content> -- Troy Donavan trdona***@yahoo.com Further to the post quoted below, I have simplified the page to contain a
single Update panel. Unfortunately, I still don't get any triggering. Here is the simplified page: <%@ Page Language="VB" MasterPageFile="~/TasiAsp.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %> <asp:Content ID="ContentLogIn" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:UpdatePanel ID="UPCountry" runat="server"> <ContentTemplate> <asp:DropDownList ID="DDCountry" runat="server" style="z-index: 100; left: 500px; position: absolute; top: 100px; width: 200"> </asp:DropDownList> <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: absolute; TOP: 130px" id="DDState" runat="server" __designer:wfdid="w4"> </asp:DropDownList> <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: absolute; TOP: 160px" id="DDLocality" runat="server" __designer:wfdid="w5"> </asp:DropDownList> </ContentTemplate> <triggers> <asp:AsyncPostBackTrigger ControlID="DDState" EventName="TextChanged"></asp:AsyncPostBackTrigger> <asp:AsyncPostBackTrigger ControlID="DDCountry" EventName="TextChanged"></asp:AsyncPostBackTrigger> </triggers> </asp:UpdatePanel> </asp:Content> -- Show quoteHide quoteTroy Donavan "Troy Donavan" wrote: > The idea here is to get the user's country, state and city and when the > country is selected the selections for state would be updated and similarly > for state, when a state is selected the selections for city would be updated. > Unfortunately, none of the triggers are firing. Any idea why? > > Here is the code in a page with three DropDownList controls. > > <%@ Page Language="VB" MasterPageFile="~/TasiAsp.master" > AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" > title="Untitled Page" %> > <asp:Content ID="ContentLogIn" ContentPlaceHolderID="ContentPlaceHolder1" > Runat="Server"> > > <asp:UpdatePanel ID="UPCountry" runat="server"> > <ContentTemplate> > > > <asp:DropDownList ID="DDCountry" runat="server" style="z-index: 100; > left: 500px; position: absolute; top: 100px; width: 200"> > </asp:DropDownList> > > </ContentTemplate> > </asp:UpdatePanel> > > > > > <asp:UpdatePanel ID="UPState" runat="server"> > <ContentTemplate> > <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: > absolute; TOP: 130px" id="DDState" runat="server" __designer:wfdid="w4"> > </asp:DropDownList> > </ContentTemplate> > <triggers> > <asp:AsyncPostBackTrigger ControlID="DDCountry" > EventName="TextChanged"></asp:AsyncPostBackTrigger> > </triggers> > </asp:UpdatePanel> > > > > > > <asp:UpdatePanel ID="UPLocality" runat="server"> > <ContentTemplate> > <asp:DropDownList style="Z-INDEX: 100; LEFT: 500px; WIDTH: 200px; POSITION: > absolute; TOP: 160px" id="DDLocality" runat="server" __designer:wfdid="w5"> > </asp:DropDownList> > </ContentTemplate> > <triggers> > <asp:AsyncPostBackTrigger ControlID="DDState" > EventName="TextChanged"></asp:AsyncPostBackTrigger> > <asp:AsyncPostBackTrigger ControlID="DDCountry" > EventName="TextChanged"></asp:AsyncPostBackTrigger> > </triggers> > </asp:UpdatePanel> > > > </asp:Content> > > > -- > Troy Donavan > trdona***@yahoo.com
Other interesting topics
force viewstate to clear on OnCommand event
GridView... RowUpdating event not firing.... Required multiple instances of a UserControl loaded at runtime Wizard.FinishButtonClick - launch browser AND redirect Return Values from Popup to UserControl How can I send shell-commands to the web-server in webcontrols? Keeping 2 user controls of the same class synced How to position a dynamically created control... How to close multiple web pages ObjectDataSource TableAdapters Point-N-Click HELL |
|||||||||||||||||||||||