cutting down on postbacks

  • Thread starter Thread starter MattB
  • Start date Start date
M

MattB

I have a payment and shipping information entry page in my application that
has two sets of address fields. I have a radio button the users can set if
the addresses are the same. That radio button does an auto postback which
triggers an event to disable the second set of fields and fill in values.
This all works fine, but can be slow for the postback. The client likes the
way the page works, but not the performance.
So, is there a way I can use .net to try and do this all on the client side
if the browser is able and only post-back if it can't? Any other
suggestions? Thanks!

Matt
 
Use javascript for this. Any .Net routines you write are going to be
executed server side.
You'll have to take out any attribute of the radio button that causes the
postback and just make a javascript call with onclick().
What .Net does provide are ways to add javascript to the page, like
RegisterClientScriptBlock,
which you can use, for example, if you need to add dynamically added
textbox id's to the javascript.

Jim
 
Back
Top