You really can't, not easily anyway. You have to avoid postbacks if you want
to maintain those values.
Otherwise you would have to create hidden input controls, store values in
those, and then pull the values out after postback, and pop them back into
the javscript variables. Not too elegant.
Might be other solutions, but none of them would be trivial.
"david" <da***@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
I write JavaScript for client side computing in HTML file in ASPX design.
However, I found that the variables declared in JavaScript are initialized
again when the page post back to the server. Therefore, after that, the
computation would be wrong. My question is how to keep the values of the
JavaScript variables unchange when the page postback to the server.
Thank you
David