asp.net textox old value

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
 
J

jeff

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.
 
P

Patrick.O.Ige

Nalaka as Jeff adviced.
Save it somwhere e.g in the session,viewstate
Patrick
 
S

Steven Cheng[MSFT]

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

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top