Cost for using Server control

  • Thread starter Thread starter Ali
  • Start date Start date
A

Ali

hi, I am new to asp.net. I have a question about
Marshelling b/w client browser and web server(database). I
heared that it is better to minimize going back and forth
b/w client browser and the server.This will increase
performance and improve scallability.
With asp.net, using server controls. It seems every action
at the client browser require a trip to the server, for
instance, page_load ( to fill combo boxes), or the event
of the combo boxes to fill other dependant combo box. or
when using the server validation controls.
What I am trying to get into is that how come asp.net
development favour using web server controls
[runat="server] even when there is cost (lots of
marshelling b/w client browser and the server)
Or my thinking is wrong.
I would appreciate your feedback to make things clear to
me.
thanks
Al
 
Ali,

Your concerns are valid. I had the same concerns when I first started
asp.net development. The reasons are fairly numerous why the man decided to
design it this way but really it comes down to tradeoffs. Even for a
function call you are trading perf for good design. Too bad you can't
inline a postback eh? But you still have control over every postback. i.e.
if you just need a link, don't create a server control, just write out an
anchor tag.

Regards,
Jason S.
 
Back
Top