|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Postbacks
<i><b>Originally posted by : Hugh Anderson (webmaster@unclehughie.com)</b></i><br />There's undoubtedly a simple answer to this, but this newbie can't find it. I have registraryion form that gathers text values. On postback, text is changed to a thank you message and a request to correct the entries, if necessary. Users are asked to click an OK button to proceed. The OK button handler sends me an email with the entries and I also want it to perform a database entry operation. My problem is that I get two emails: one when the first postback happens, and another when the OK button is clicked. I've tried variois postback conditionals without success. Anybody any ideas? <br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Kurt Vandevelde (Kurt.Vandevelde@CMG.Be)</b></i><br /><br /><br /><br />------------<br />Hugh Anderson at 3/24/2002 1:05:22 PM<br /><br />There's undoubtedly a simple answer to this, but this newbie can't find it. I have registraryion form that gathers text values. On postback, text is changed to a thank you message and a request to correct the entries, if necessary. Users are asked to click an OK button to proceed. The OK button handler sends me an email with the entries and I also want it to perform a database entry operation. My problem is that I get two emails: one when the first postback happens, and another when the OK button is clicked. I've tried variois postback conditionals without success. Anybody any ideas? <br /><br />Your way of work isn't 100% clear to me, but maybe this can solve your problem :<br /><br />- use a session variable to stock if an email was sent or not<br />- use a (custom) validator and page.isvalid or [validator].isvalid<br />- test your database to see of the values are already insert <br /><br />Kurt
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : Hugh Anderson (webmaster@unclehughie.com)</b></i><br />Thanks, Kurt, but I didn't explain clearly enough. My problem seems to be that the PageLoad event also triggers the OK-click event in the first postback. Then clicking on the OK button triggers that event again in a second postback. What I'm trying to do is to stop the OK-click event from firing in the first postback.<br />Hope this is clearer.<br /><br />------------<br />Kurt Vandevelde at 3/26/2002 1:45:23 AM<br /><br /><br /><br /><br />------------<br />Hugh Anderson at 3/24/2002 1:05:22 PM<br /><br />There's undoubtedly a simple answer to this, but this newbie can't find it. I have registraryion form that gathers text values. On postback, text is changed to a thank you message and a request to correct the entries, if necessary. Users are asked to click an OK button to proceed. The OK button handler sends me an email with the entries and I also want it to perform a database entry operation. My problem is that I get two emails: one when the first postback happens, and another when the OK button is clicked. I've tried variois postback conditionals without success. Anybody any ideas? <br /><br />Your way of work isn't 100% clear to me, but maybe this can solve your problem :<br /><br />- use a session variable to stock if an email was sent or not<br />- use a (custom) validator and page.isvalid or [validator].isvalid<br />- test your database to see of the values are already insert <br /><br />Kurt
|
|
#4
|
|||
|
|||
|
<i><b>Originally posted by : jeff raven (jeff.raven@dbase-solutions.co.uk)</b></i><br />Hi, why dont you use a client side form validator to check if all entries are correct in the text fields, then send this off to a script page to do your database entry and send your email, then redirect back to original page with a querystring to say "thank you message".<br /><br /><br />------------<br />Hugh Anderson at 3/26/2002 3:20:38 PM<br /><br />Thanks, Kurt, but I didn't explain clearly enough. My problem seems to be that the PageLoad event also triggers the OK-click event in the first postback. Then clicking on the OK button triggers that event again in a second postback. What I'm trying to do is to stop the OK-click event from firing in the first postback.<br />Hope this is clearer.<br /><br />------------<br />Kurt Vandevelde at 3/26/2002 1:45:23 AM<br /><br /><br /><br /><br />------------<br />Hugh Anderson at 3/24/2002 1:05:22 PM<br /><br />There's undoubtedly a simple answer to this, but this newbie can't find it. I have registraryion form that gathers text values. On postback, text is changed to a thank you message and a request to correct the entries, if necessary. Users are asked to click an OK button to proceed. The OK button handler sends me an email with the entries and I also want it to perform a database entry operation. My problem is that I get two emails: one when the first postback happens, and another when the OK button is clicked. I've tried variois postback conditionals without success. Anybody any ideas? <br /><br />Your way of work isn't 100% clear to me, but maybe this can solve your problem :<br /><br />- use a session variable to stock if an email was sent or not<br />- use a (custom) validator and page.isvalid or [validator].isvalid<br />- test your database to see of the values are already insert <br /><br />Kurt
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Multiple Postbacks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|