|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
servercontrols (webcontrols, htmlcontrols) or html elements?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 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! 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 > > Nathan Sokalski wrote:
Show quoteHide quote > The best answer to a question like that is that there are sometimes other Thanks> 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!
Trouble with validator control ? Script not found
Is there a free .GIF software? Trouble with validator control ? script not found Display data in asp:Calendar ASP.NET 2.0 DataView DetailsView ImageField displaying images from Filtering the Asp:FileUpload control Changing RadioButton's NAme and ID properties using vb.net Gridview and colspan Scroll position in panel control Adding AutoPostBack to a webcontrol |
|||||||||||||||||||||||