views:

98

answers:

1

I have an app that currently uses a bunch of include directives of aspx files, a lot like a classic ASP app might work. (I know, ugh.) I would really love to convert this to dynamic user controls since the URL/querystring will help determine what code should execute. I know that I'll need to dynamically load user controls before the Page_Load event fires if I do it manually. On another SO question I saw, someone pointed to DynamicControlsPlaceholder which seems like a cool idea. Though, that software hasn't been updated since 2006 so I'm wondering if it's kept up with more recent innovations like ASP.NET ajax, .NET 3.5 etc. Also, my dynamic controls may need to do a lot of database updates, talk to various parts of the page etc. Does anyone have a recommendation of a good packaged solution? Alternately, if people think I should consider writing all the control-insertion logic myself is there a really good tutorial out there I can look at?

+2  A: 

As long as they keep the same name on recreation you can rely on viewstate to repopulate them as usual.

They need to be recreated in the page init event.

You can store information needed to recreate them somewhere like session.

this is pretty good, but a little old

Hope that helps.

DeletedAccount