p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   what is the best to do, better performance (http://p2p.wrox.com/showthread.php?t=7217)

alyeng2000 December 13th, 2003 07:37 AM

what is the best to do, better performance
 
for example if i have to reset some fields texts, i could do that using either vb code or jscript, but it is easiest to do using the vb code [?]

Ahmed Ali
Software Developer

Imar December 13th, 2003 07:56 AM

Hi there,

It depends on how you implement it. If you send the necessary JavaScript to the browser on the first hit, that will be much faster. The code will execute at the client, so there is no need for a round trip, saving time and bandwidth.

If you are posting back to the server, you'll need to clear the fields there with VB and then send the empty form fields back to server. The advantage of this solution is that you have a bit more control over what is cleared, how, why and whether it's allowed or not, although you can accomplish all these things with JavaScript as well.

IMO, "easier" is not always the best reason to choose for a certain solution. You'll need to keep your user in mind and find out what they think is easiest for them.....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.


All times are GMT -4. The time now is 12:58 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.