473,729 Members | 2,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_On SelectedIndexCh anged and it does'nt refresh up2
In aspx page :

<asp:UpdatePane l id="up1" runat="server" UpdateMode="Con ditional">
<contenttemplat e>
.....
<asp:combobox ID="MyfirstComb o" runat="server">
<asp:UpdatePane l id="up2" runat="server"
UpdateMode="Con ditional">
<contenttemplat e>
<asp:combobox ID="MySecondCom bo"
runat="server">
</contenttemplate >
<triggers>
<asp:AsyncPostB ackTrigger ControlID="Myfi rstCombo"
EventName="Sele ctedIndexChange d"></asp:AsyncPostBa ckTrigger>
</triggers>
</asp:UpdatePanel >

<triggers>
<asp:AsyncPostB ackTrigger ControlID="MyBu tton"
EventName="Clic k"></asp:AsyncPostBa ckTrigger>
</triggers>
</contenttemplate >
<asp:Button ID="MyButton" runat="server" OnClick="MyButt on_Click" />
</asp:UpdatePanel >
In aspx.cs page :

MyfirstCombo.Se lectedIndexChan ged += new
combobox.Select edIndexChangedH andler(MyfirstC ombo_OnSelected IndexChanged);

Please, Have you go a solution ?

Aug 6 '07 #1
3 4753
<fr*********@ya hoo.frwrote...
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_Rela ted_Drop_Down_L ists_With_AJAX. aspx>

Regards

Rob
Aug 6 '07 #2
<Rob Meadewrote...
AutoPostBack = True
...
<http://www.singingeels .com/Articles/Populating_Rela ted_Drop_Down_L ist...>

Thanks a lot, It works !!!!!

I put the 2 comboBoxes in the same update panel and I put
autoPostBack="t rue" in the 1rst comboBox.
I set ChildrenAsTrigg ers="false".

Regards

Akuma

Aug 6 '07 #3
<fr*********@ya hoo.frwrote ...
Thanks a lot, It works !!!!!
You're welcome :o)

Regards

Rob
Aug 8 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5520
by: Phillip Ian | last post by:
Tried this over in CSharp.General and didn't get anything, so I thought I'd try again here. If there's an AJAX specific group I could ask this in, please let me know...I did look. I'm trying to code what I think is a fairly typical Master/Detail scenario with two GridViews, using AJAX. Using the Northwind sample, I have two ObjectDataSources - one which pulls data from the Orders table, and one that pulls the related data from . Each...
0
3982
by: wiertara | last post by:
Hi, i have a problem with refreshing data in UpdatePanel. In aspx file i have a AjaxToolKit TabContainer and inside it a UpdatePanel: <asp:UpdatePanel ID="upRemoveUser" runat="server" OnLoad="upRemoveUser_Load"> <ContentTemplate> <center> <asp:Panel ID="pnlInfoRemove" runat="server" Height="20px" Width="400px" Visible="false"> <asp:Image ID="imgInfoRemove"
1
1664
by: =?Utf-8?B?cml2YWxAbmV3c2dyb3Vwcy5ub3NwYW0=?= | last post by:
Morning, I've still got an issue with an AJAX enabled site. I've a master page with two ContentPlaceholders. I've then got a default aspx page which contains several user controls I've written. Each user control contains an UpdatePanel. Each UpdatePanel has UpdateMode='Conditional' set to it. When one of the UpdatePanel updates, they all update.
3
2216
by: =?Utf-8?B?T2xlZw==?= | last post by:
(in .NET 2.0 with AJAX extensions) I have an UpdatePanel on the form. Now I want to use a link outside of my UpdatePanel to make it to update (asynchronously) and also send some(at least one ) parameters. I'm trying using ICallbackEventHandler, but it doesn't update the UpdatePanel. Any suggestions? Thanks.
0
999
by: Barno77 | last post by:
Hi Everyone, I have a Gridview in a UpdatePanel and everytime I click Edit button to edit a row of data in Gridview, the page refreshes. Would like to not Refresh page everytime! Any suggestions? Thanks in Advance!
4
11865
by: pechar | last post by:
Hi All, This question has been asked many times and I've checked most of the sites with resolutions. None worked for me. 1) I have a page which is a content page to a Masterpage . 2) I have a ScriptManager on the Masterpage. 3) On the content page I have a TabContainer control. 4) On one of the tabs I have a form, part of which (a FileUpload control) I set to disabled if a Checkbox is ticked. So I decided to put an UpdatePanel...
1
4875
by: abcd | last post by:
I have a master page which has Script Manager declared. I have content page TestContent.aspx, it includes User Controls (.ascx) called FirstControl.ascx. FirstControl.ascx includes another user control called SecondControl.ascx. SecondControl.ascx has Update Panel (upREfreshMeOnly) and a button - Search button outside the Update Panel. When I click that button the whole page refreshes and I want it should refresh onlyu...
4
2805
by: Peter | last post by:
ASP.NET 3.5 I have a web page and this web page has a DataList, when user hovers the mouse over a picture in the datalist a popup appers, this popup is a User Control and it has a cancel button. After the user clicks on the cancel button I want the DataList to refresh its self. How can I do that - how can I tell the DataList or the parent web page to refresh it's self from the Popup / User Control?
2
12268
by: qwedster | last post by:
Folks! The following is a "Hello World" kind of code for ViewState. I just want to know how to retain the ViewState 1) while Page Refresh when using UpdatePanel and also 2) While I reverting back to the page after round trip when using UpdatePanel? In the following code snippet the ViewState is killed when I click page refresh or when I go some page and revert back Code Snippet: // Default.aspx:
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.