session data

chand

Freshman
Joined
Feb 4, 2004
Messages
30
Hi

I have aspx page with 10 text boxes and change buttons.each textbox have change button.when user clicks change button it will enable textbox and user can change value so on.what i have to do is when user clicks finally submit button i need to grab in which textboxes he made changes and those changed values i need send in mail.i know how to send mail but how can i grab user made changes only.whenver user clicks change button that screen post to the server to enable that texbox.

txtaa change1
txtbb change2
txtcc change3 .........so on

can anyone tell me hv do i grab changed values or any article.initially i am getting values from dataset.

i would appreciate anyhelp
 
Only enabled textboxes will be posted back anyway, so if you have 10 textboxes and only 3 of them are enabled when the submit button is hit, only the results of those 3 will be posted back to the page.
 
Last edited:
hv can i check

how can i check them which are changed and compare against old values and send them in mail.i know sending mail but my problem how can i check which values are changed
thanks
 
Code:
dim item
For each item in Request.Form
  if (left(Request.Form(item),3)="txt" then
    ' this form object is a text box and it is enabled so we can 
    ' assume that it has been changed
    Response.Write (item & " has been changed to a new value of " & Request.Form(item) & "<br>")
  End if
Next

The other way that you can do it is to have two controls for each form object - a textbox where the current value is shown and can be changed and a hidden control containing the current value. When the user clicks Submit, just compare each of the textboxes against its relevant hidden control.
 
Back
Top