Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Issues in ASP.NET 2.0 when dynamically loading user controls or asp.net web controls???

Reply
Thread Tools

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

 
 
Bob Rock
Guest
Posts: n/a
 
      09-17-2006
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



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-17-2006
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Loaded controls loading other controls =?Utf-8?B?V291dGVy?= ASP .Net 3 02-27-2006 07:25 PM
Reference directive when loading web user controls dynamically Lionel Orellana MCAD 2 02-09-2005 11:14 AM
loading user controls dynamically Nick Stansbury ASP .Net 1 07-19-2004 12:38 PM
when loading user controls dynamically, problem on postback sonic_soul ASP .Net 0 08-14-2003 10:05 PM
Re: Loading/Unloading web user controls dynamically in code - Does this look right? Ben Miller [msft] ASP .Net 0 08-05-2003 05:57 AM



Advertisments