ASP.NET AJAX in Dynamically Loaded ASCX Files

Cristian Merighi () 0.00

Something has changed with the ASP.NET AJAX package 1.0 (Beta), that's a fact. Who, like me, handled AJAX objects in a free-and-easy manner has now to face some problems. Nothing dramatic actually...
This article is obsolete. Some functionalities might not work anymore. Comments are disabled.

Some days ago ASP.NET AJAX 1.0 Beta + CTP, together with the always richer Toolkit have been revealed and shared to the community of developers.
I'm now upgrading my web application to make it 1.0 compatible... tedious work...

By changing web.config settings, WebControls' prefixes and by removing the various obsolete ExtenderProperties... I've been facing a serious problem!
Well, not so serious actually, but certainly annoying.

I've handled several elements of my blog so far using proper UserControls (ASCX). I don't esteem UserControl particulary - specially when they comes with input fields and interactive purposals - but I considered them the appropriate solution to my context situation.
Those UserControls are (still) dynamically loaded using the classic LoadControl method, and they process their internal content receving DataBound stuff from parent controls.
In the Control life pipe-line I came to handle childcontrols at PreRendering time... I know I'm a bit lazy! But everything worked fine since Atlas and <script type="text/xml" /> structure were on the scene.
Now that the full, brilliant, javascript management (Sys.Application...) leads the path, things have changed: ScriptManager renders its key script blocks before my ASP.NET AJAX objects are added to the WebForm! Result: not-working app.

Once the reason had been discovered, armed with a bit more attitude, I provided the necessary modifications to fit the new scenario.

I hope this could help all the early-adopter with similar problems.

Take care. Bye.




Cristian Merighi facebook twitter google+ youtube

Latest articles

Top rated


Where am I?


Cristian Merighi facebook twitter google+ youtube

I'm now reading