473,738 Members | 8,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UpdatePanel and Dropdown List

I have an UpdatePanel with a dropdown list that I can't seem to get to
update. It has a hidden button which I click from javascript added to the
page when another update panel is updated. Triggers didn't work for this that
is why I'm using the script.

The script is registered with...
ScriptManager.R egisterStartupS cript(Page, GetType(), "Update",
String.Format(" $get('{0}').cli ck();", buttontoclick.C lientID), true);

<asp:UpdatePane l ID="panel" UpdateMode="Con ditional"
ChildrenAsTrigg ers="true" runat="server">
<ContentTemplat e>
<asp:Button ID="dropdownBut ton" runat="server" Style="display:
none;" OnClick="dropdo wn_Click" />
<asp:DropDownLi st ID="dropdown" runat="server" />
</ContentTemplate >
</asp:UpdatePanel >

The code all executes and the data for the drop down is updated but it is
never rendered to the page. I put a text box in the panel just to see if
anything was getting updated and it wasn't.

I have another update panel that is updated in similar fashion to this but
its datasource is a repeater. It has the same issue. The data is updated but
never rendered.

I have other update panels on the page and they update just fine. I'm not
sure what the problem with these two panels are.
Nov 20 '07 #1
1 3203
I figured out a work around. If I call window.setTimeo ut with a wait of 3
seconds before I click the button, the panel updates. I think it has
something to do with the script loader. Scripts have to be fully loaded
before I can do another post back.

"Stormbring er" wrote:
I have an UpdatePanel with a dropdown list that I can't seem to get to
update. It has a hidden button which I click from javascript added to the
page when another update panel is updated. Triggers didn't work for this that
is why I'm using the script.

The script is registered with...
ScriptManager.R egisterStartupS cript(Page, GetType(), "Update",
String.Format(" $get('{0}').cli ck();", buttontoclick.C lientID), true);

<asp:UpdatePane l ID="panel" UpdateMode="Con ditional"
ChildrenAsTrigg ers="true" runat="server">
<ContentTemplat e>
<asp:Button ID="dropdownBut ton" runat="server" Style="display:
none;" OnClick="dropdo wn_Click" />
<asp:DropDownLi st ID="dropdown" runat="server" />
</ContentTemplate >
</asp:UpdatePanel >

The code all executes and the data for the drop down is updated but it is
never rendered to the page. I put a text box in the panel just to see if
anything was getting updated and it wasn't.

I have another update panel that is updated in similar fashion to this but
its datasource is a repeater. It has the same issue. The data is updated but
never rendered.

I have other update panels on the page and they update just fine. I'm not
sure what the problem with these two panels are.

Nov 27 '07 #2

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

Similar topics

1
8293
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two dropdown lists. If you change the selection of the left one (e.g. choose parentoption2), it should open up page2.htm in a popup window.
0
2341
by: Prashant Majhwar | last post by:
<atlas:UpdatePanel ID="UpdatePanel1" runat="server"> <contenttemplate> <-------webpartcontro------l> </contenttemplate> </atlas:UpdatePanel> My webpart contains a dropdown list and linkbuttons. Dropdown list becomes empty when i use the update panel. Any solutions to this ? --Prashant Majhwar
5
11902
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My dropdown list control does not retain its SelectedValue. Unless I read the SelectedValue right after the control has been loaded, populated, and assigned with its original value (and of course that is
4
9087
by: Rob Meade | last post by:
Hi all, Ok - this might sound kinda stupid - but I cant see how to do it... I've got an update panel which contains, on one horizontal line, a drop down list, then an image, then another drop down list and then another image. I want to align the images so that they are in the middle of the row so to speak, ie, not at the top. As the updatePanel simply renders a DIV tag I figured that I would be able to do something like:
0
1727
by: Frank | last post by:
Hi, I have read the other post about hiding the updatepanel using the ajax lifecycle as such at the end of the aspx page: <script type="text/javascript" language =javascript> var c = new Sys.UI.Control($get("GridPanel")); function beginRequestHandler(sender, args)
1
1601
by: Sam Samson | last post by:
Hi All, I am creating a asp.net tool that uses 2 graphs (chartFx Pie chart and ChartFx Barchart ) The effect I'd like to get is to have the Bar chart in an update panel and when a user clicks on a segment of the Pie Voila the Barchart updates. If I populate a dropdown list with the information that populates the Pie chart then it is straight forward in using the dropdown to trigger the update panel.
0
1172
by: Marc | last post by:
"jacoberg2" <jacoberg2@hotmail.comwrote in message news:cdcbd57a-8736-464e-9c57-defedcd3c7ff@l42g2000hsc.googlegroups.com... Never heard of this before....! Are you sure it's not reloading the page when you view it normally? A way to test this in IE and Firefox is to navigate to the page, clear the address bar and then click whatever it is you need to click. If the address bar gets filled back up with your URL, then a full page post...
3
3832
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to DropDownList1 using the ScriptManager SetFocus method. Use the Visual Studio debugger. Set a breakpoint on in the (!IsPostBack) part of the PageLoad method. Start the web application and continue after the breakpoint has been reached.
8
6257
by: Nick | last post by:
Hi there, I have a GridView in an UpdatePanel, each time the UpdatePanels Load event fires I set the DataSource and call DataBind of the grid view. This works great once, I add an item to the list and the control updates, my breakpoints get in in the UpdatePanel Load event. Only problem is on the second time, even though the code is executed, the GridView doesn't change. I have disabled the view state for the grid view but still the...
0
9476
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...
1
9263
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
8210
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...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
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
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.