Hi, I have an input box(asp.net textbox). When user makes a change to the value I need to save the old value forst. What event can I hook up to the box to get the old value? Also how can I get the value that was there before update
You can get the value that was on the input when it was first delivered to the page (whether you have changed it or not) by looking at the defaultValue property of the input.
Code:
<input id="test" type="text" value="A">
Whether you change the input (or not) you can get the original (default) value using something like:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.