473,394 Members | 1,701 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,394 software developers and data experts.

Issues in ASP.NET 2.0 when dynamically loading user controls or asp.net web controls???

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 asp.net web controls. I
searched for articles on the internet and in the end I must say that I'm
confused.
I read about issues related to:

a.. events not firing
b.. state management
c.. postbacks
but a lot of these articles were old, dealing with v1.1 or even v1.0 of the
framework so I really don't know if any of these issues still exist and what
they are. I know however that Microsoft used this technique of dynamic
controls loading in the old IBuySpy portal starter kit ..... so I maybe it
is not so bad.

Could anyone please briefly recap if any issues still exist in ASP.NET v2.0
when dynamically loading user controls (.ascx) and/or asp.net web
controls???
Thanks.
Bob Rock

Sep 17 '06 #1
1 1825
The majority of issues related to dynamic loading of controls deal with
users loading controls at the wrong time in the cycle. You have to know when
to load the control, depending on what you are doing. ViewState, for
example, loads after Init, but before Page_Load. Depending on how you use
the control, you might have to bind in Init instead of Page_Load.

Are these "problems" still extant in 2.0? Yes, because so few people
actually read about the page lifecycle and do it properly.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Bob Rock" <ye********************@hotmail.com.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
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 asp.net web controls. I
searched for articles on the internet and in the end I must say that I'm
confused.
I read about issues related to:

a.. events not firing
b.. state management
c.. postbacks
but a lot of these articles were old, dealing with v1.1 or even v1.0 of
the framework so I really don't know if any of these issues still exist
and what they are. I know however that Microsoft used this technique of
dynamic controls loading in the old IBuySpy portal starter kit ..... so I
maybe it is not so bad.

Could anyone please briefly recap if any issues still exist in ASP.NET
v2.0 when dynamically loading user controls (.ascx) and/or asp.net web
controls???
Thanks.
Bob Rock

Sep 17 '06 #2

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

Similar topics

5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
1
by: Sundaresan | last post by:
I've a form where I load two user controls dynamically. User Control-1 has a no.of dropdowns and based on the selection I typically populate a datagrid in the user control-2, Also the I could...
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...
7
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb --...
2
by: Vivek Sharma | last post by:
Hi There, I have a situation where I wish to load the controls dynamically on the basis of user role. Hence, I am using this code. if (UserRole == "IS Administrator") { Control UC1 =...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
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....
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
0
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...

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.