Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted (edited)
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. Edited by hankthetank
Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...