asp.net textox old value

  • Thread starter Thread starter Nalaka
  • Start date Start date
N

Nalaka

Hi,
I need to get the old (original) value of a textbox control.

I have put code in the textbox_textChanged ....
I can get the new value ((texBoxControl) sender).text
but I need to know the old value....


is there a way to access the old value?


any help is appreciated.
Nalaka
 
Once a value has been changed you do not get the old value back unless you
save it somewhere. It's like saying can I go back to yesterday to get
something.
 
Nalaka as Jeff adviced.
Save it somwhere e.g in the session,viewstate
Patrick
 
Thanks for all your inputs.

Hi Nalaka,

As other members have mentioned, since the TextBox control doesn't store
old value by default, we may need to maually store this value in some
storage ourselves. In addition, if you need to use such textboxes in many
different projects, you can consider creating a custom textbox control
derived from the built-in textbox.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top