Home All Groups Group Topic Archive Search About

servercontrols (webcontrols, htmlcontrols) or html elements?

Author
27 Mar 2006 7:27 AM
Dirk
Hi,

Suppose an application where the user has to chose an id-number in a
'select'. Data connected to that id-number must be fetched from a table and
undergo heavy calculations and finally displyed into several textboxes.

In order to minimize transfer between server and client, is it not better to
use simple html elements instead of servercontrols?
With servercontrols, the chosen value must be sent to the server, then the
data fetched and sent back to the client in order to be perform the
calculations (could happen on the server but risk for overload), then sent
back to the server to put the value into the textboxes and finally sent to
the client for display. Total = 4 transferts.
With simple html-elements, one tranfert from client to server with the
selected value, then transfert from server to client with the data, then
calculations on client and display in texboxes.Total = 2.

If  I'm right, can anyone explain me when using servercontrols, taking into
account the balance between client and server.
Thanks
Dirk

Author
28 Mar 2006 5:38 AM
Nathan Sokalski
The best answer to a question like that is that there are sometimes other
factors. Sometimes these include things such as:

Some pages are easier to update when using Server Controls
If there are a large quantity of choices, it may be more efficient to use
Server Controls so that the page is more dynamic
Even though it is true that all output sent to the browser can be generated
without Server Controls, if you compare how much work you would need, there
is a big difference

One thing that people don't always do for situations like yours is use
Client-Side JavaScript to do as much as possible to minimize the number of
transfers. This isn't always a solution, but depending on the situation it
can help (a good example is the validation controls). But you are right, in
some situations regular HTML elements are more appropriate. It's hard to say
until you've seen the actual code and purpose, so I'm not going to try and
tell you which one is better for your situation, but see if what I've said
helps you determine that for yourself. Good Luck!
--
Nathan Sokalski
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Dirk" <did***@dssd.it> wrote in message
news:OWTWXAXUGHA.4792@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> Suppose an application where the user has to chose an id-number in a
> 'select'. Data connected to that id-number must be fetched from a table
> and
> undergo heavy calculations and finally displyed into several textboxes.
>
> In order to minimize transfer between server and client, is it not better
> to
> use simple html elements instead of servercontrols?
> With servercontrols, the chosen value must be sent to the server, then the
> data fetched and sent back to the client in order to be perform the
> calculations (could happen on the server but risk for overload), then sent
> back to the server to put the value into the textboxes and finally sent to
> the client for display. Total = 4 transferts.
> With simple html-elements, one tranfert from client to server with the
> selected value, then transfert from server to client with the data, then
> calculations on client and display in texboxes.Total = 2.
>
> If  I'm right, can anyone explain me when using servercontrols, taking
> into
> account the balance between client and server.
> Thanks
> Dirk
>
>
Author
28 Mar 2006 7:40 AM
user
Nathan Sokalski wrote:
Show quoteHide quote
> The best answer to a question like that is that there are sometimes other
> factors. Sometimes these include things such as:
>
> Some pages are easier to update when using Server Controls
> If there are a large quantity of choices, it may be more efficient to use
> Server Controls so that the page is more dynamic
> Even though it is true that all output sent to the browser can be generated
> without Server Controls, if you compare how much work you would need, there
> is a big difference
>
> One thing that people don't always do for situations like yours is use
> Client-Side JavaScript to do as much as possible to minimize the number of
> transfers. This isn't always a solution, but depending on the situation it
> can help (a good example is the validation controls). But you are right, in
> some situations regular HTML elements are more appropriate. It's hard to say
> until you've seen the actual code and purpose, so I'm not going to try and
> tell you which one is better for your situation, but see if what I've said
> helps you determine that for yourself. Good Luck!

Thanks