Andrew,
I agree with you, one should avoid hacker-style programming. I actually
never use __doPostBack. My ASP.NET experience started from writing a few
heavily server- and code behind-oriented applications. They were slow and
GUI was bad. That was due to lack of experience with client side and clear
understanding client-server coordination. Now I tend to load the client-side
with more and more tasks. My client-side is evolving from just a set of
separate scripts to a design layer with its own infrastructure. The improve
is dramatic. My web apps are comparable to window forms ones in speed and
more attractive in GUI. The development indeed takes longer, but I am sure
the development tools for client side will improve.
Happy programming,
Eliyahu
Andy Z Smith said:
I agree with you, but I beg to differ. Take a quick look at a public
domain solution to the pop-up calendar problem.
REF:
http://www.csharphelp.com/archives3/archive563.html
This author has made a pretty good use of the coordination between
contexts. But, as you notice, and not horrendously, but he is already using
the __doPostBack functions. I urge you to find the Microsoft documentation
that references this function publicly. I think that going deep into those
..NET internal functions is just asking for trouble as the framework is
enhanced and changed and your code breaks due to "__DoPostBack" being
deprecated.
I agree the "power" apps are going to push the limits and use all kinds of
techniques to achieve the desired effect. I think the compromise must be
made between development time, functionality and future
compatibility/maintainability.
My bet is on using what Microsoft has provided (namely CodeBehind) which
allows for an Object Oriented view of an inherently 'chatty' client-server
browser based application.