DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 06 Aug 2007 00:09:02 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    unknown
          2    Rob Meade
                 3    Rob Meade
          4    unknown


refresh an updatePanel in an other updatePanel   
Hye,


I've got some problems in developping web sites with Visual Studio
2005 (ASP.net & C#) and the Microsoft Ajax library.

In my webpage

default.aspx

I've got 2 update panels

The 1rst contains all my components (labels, textboxes, a combobox and
a 2nd update panel)


The 2nd update panel contains a single combobox.

The interest is when I change the first combobox index, the 2nd (which
is in the 2nd update panel).

But when I execute my program :


I select an item in my first combo, and it refresh my second with
right values.
But when I select another item, the program does'nt do
MyfirstCombo_OnSelectedIndexChanged and it does'nt refresh up2


In aspx page :

<asp:UpdatePanel id="up1" runat="server" UpdateMode="Conditional">
        <contenttemplate>
.....
	<asp:combobox ID="MyfirstCombo" runat="server">
        <asp:UpdatePanel id="up2" runat="server"
UpdateMode="Conditional">
        	<contenttemplate>
                          <asp:combobox ID="MySecondCombo"
runat="server">
                </contenttemplate>
                <triggers>
                	<asp:AsyncPostBackTrigger ControlID="MyfirstCombo"
EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
                </triggers>
         </asp:UpdatePanel>

	<triggers>
             <asp:AsyncPostBackTrigger ControlID="MyButton"
EventName="Click"></asp:AsyncPostBackTrigger>
       	</triggers>
	</contenttemplate>
	<asp:Button ID="MyButton" runat="server" OnClick="MyButton_Click" />
</asp:UpdatePanel>


In aspx.cs page :

MyfirstCombo.SelectedIndexChanged += new
combobox.SelectedIndexChangedHandler(MyfirstCombo_OnSelectedIndexChanged);

Please, Have you go a solution ?
Date:Mon, 06 Aug 2007 00:09:02 -0700   Author:  

Re: refresh an updatePanel in an other updatePanel   
wrote...


> Please, Have you go a solution ?


Try setting the following property:

AutoPostBack = True

to the first control which will cause the population on the second control.

There's an article here for you, but its in vb rather than c#...

<http://www.singingeels.com/Articles/Populating_Related_Drop_Down_Lists_With_AJAX.aspx>

Regards

Rob
Date:Mon, 6 Aug 2007 09:34:08 +0100   Author:  

Re: refresh an updatePanel in an other updatePanel   
<Rob Meade> wrote...

> AutoPostBack = True
>...
> <http://www.singingeels.com/Articles/Populating_Related_Drop_Down_List...>



Thanks a lot, It works !!!!!

I put the 2 comboBoxes in the same update panel and I put
autoPostBack="true" in the 1rst comboBox.
I set ChildrenAsTriggers="false".

Regards

Akuma
Date:Mon, 06 Aug 2007 02:20:16 -0700   Author:  

Re: refresh an updatePanel in an other updatePanel   
wrote ...


> Thanks a lot, It works !!!!!


You're welcome :o)

Regards

Rob
Date:Wed, 8 Aug 2007 07:30:17 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us