| re: ASP.NET 2 UserControls
> I'm in the same boat, and the path I'm heading down is a custom class[color=blue]
> that can take a page, loop through its controls, and generate
> javascript along the lines of:
>
> var {ClientID} = document.getDocumentById["{ClientID}"];
>
> A bit of a hack, but then I can consistently refer to form fields via a
> simple syntax, and not worry about how they're actually generated.[/color]
This might not be a bad idea, after all. But we'd have to change in so many
places. I figured out how to make it work... most of the code I work on has
always used the document.forms[0]. ... syntax for identifying form elements.
Code I have not worked on used the document.Form1. ... syntax. This was one
of those cases. In ASP.NET 2, it is "form1" (lower-case F) which caused the
problem.
I'm all for change and progress. But when Microsoft expects us to upgrade
and migrate to the latest and greatest, they should at least do more than
pay lip-service to compatibility. ASP.NET 2.0 is so drastically different
from 1.x... even their own migration wizard failed to convert the site.
Their rendered output isn't friendly to client-scripting, either. For
example, we can't use MasterPages in our site where it would make the most
sense and give us tremendous benefits because, we would have no way to
predict how the Javascript should reference the controls on the Master page
because it tries to uniquely name each thing. Prudent, I suppose. But they
need to not assume that I'm an idiot. I know what I'm doing. Thus, we
can't store any client script in the Master Pages. Well, then Master Pages
are useless for our site and the design of our site won't change to fit into
the tiny little box MS wants us to be in. Our web application is so much
bigger than their vision, appearantly.
But, in all, apart from ASP.NET, the migration was smooth. Unfortunately,
our applications is Web based, thus its a problem.
Thanks,
Shawn |