473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Dynamically loading User Controls

Hey guys,

I'm working on an AJAX Enabled ASP.NET Web application. I have a TreeView
web control and an PlaceHolder web control. My PlaceHolder is inside an
UpdatePanel and AsyncPostBacks are triggered by the SelectedNodeChanged
event of the TreeView. I dynamically load user controls into my PlaceHolder
depending on what node the user clicks on the TreeView. The user control is
loaded into the page and is displayed to the user.

These user controls would normally have a buttons for save, update, and
delete operations. My problem is that "SOMETIMES" when I click on a button
in my dynamically loaded user control, the user control is just reloaded and
the button click event is not fired. This problem does not occur every time
though, which makes it very annoying!

Any ideas on how to ensure that buttons within my dynamically loaded user
controls fire click events everytime its clicked?

--
Regards,
Christian
Aug 6 '08 #1
1 2003
Found the problem! I did not set the ID of the UserControl I wanted to load
dynamically.

--
Regards,
Christian

"Christian Resma Helle" <christian [dot] helle [at] yahoo [dot] comwrote
in message news:eu**************@TK2MSFTNGP06.phx.gbl...
Hey guys,

I'm working on an AJAX Enabled ASP.NET Web application. I have a TreeView
web control and an PlaceHolder web control. My PlaceHolder is inside an
UpdatePanel and AsyncPostBacks are triggered by the SelectedNodeChanged
event of the TreeView. I dynamically load user controls into my
PlaceHolder depending on what node the user clicks on the TreeView. The
user control is loaded into the page and is displayed to the user.

These user controls would normally have a buttons for save, update, and
delete operations. My problem is that "SOMETIMES" when I click on a button
in my dynamically loaded user control, the user control is just reloaded
and the button click event is not fired. This problem does not occur every
time though, which makes it very annoying!

Any ideas on how to ensure that buttons within my dynamically loaded user
controls fire click events everytime its clicked?

--
Regards,
Christian

Aug 7 '08 #2

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

Similar topics

7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
1
by: Josh | last post by:
Hi Guys, I have been having a big problem with trying to pass parameters into a user control when the user control is dynamically loaded into a placholder. I am developing in c#. I have get...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
1
by: kanones | last post by:
Hi - I am seeing some performance degradation when I am loading a control dynamically onto a page with multiple other dynamical controls using Page.LoadControl versus dragging and dropping it...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
2
by: A.Wussow | last post by:
Hi Everybody, i want to load dynamically content from some user controls (with forms, or some data-controls) using atlas. So i use an UpdatePanel for loading the user control into a placeholder....
2
by: nemesis.saurabh | last post by:
hi, Can we dynamically load a user control in the web form. problem i am facing is i have 2 user controls: uc1 and uc2. when my page is loading the functions and variables in the uc1 is...
1
by: Bob Rock | last post by:
Hello, I'm new to ASP.NET and I've been looking into the topic of dynamically loading (typically accomplished with a LoadControl followed by a MyControl.Controls.Add()) both user controls and...
5
by: Andrew Robinson | last post by:
I have a page that can load a number of different user controls. Each of these user controls inherits from a common base class and the controls are loaded based on application state, status, etc...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.