473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Send Email on Initial Page Load once only

Hello,

I was wondering if anybody knows how to disable Email Sending on Page
Refresh.
When shopper submits the order he/she is being redirected to the receipt
page and gets the email confirmation, which is being send once the last page
in Order Process displayed (Receipt page). Shopper is allowed to refresh
that page since the data has been inserted on the previous page. The only
problem I have is that the email is being sent every time the last page is
refreshed. How to disable this? How to check if the page has been refreshed?

Thank you,
Tatyana
Aug 7 '06 #1
3 1684
Tatyana wrote:
Hello,

I was wondering if anybody knows how to disable Email Sending on Page
Refresh.
When shopper submits the order he/she is being redirected to the receipt
page and gets the email confirmation, which is being send once the last page
in Order Process displayed (Receipt page). Shopper is allowed to refresh
that page since the data has been inserted on the previous page. The only
problem I have is that the email is being sent every time the last page is
refreshed. How to disable this? How to check if the page has been refreshed?

Thank you,
Tatyana
If Session("EmailSent") Is Nothing then
'Send Email
Session("EmailSent") = True
End If

Unless you're really wanting to avoid using the Session.

Damien

Aug 7 '06 #2

"Damien" <Da*******************@hotmail.comwrote in message
news:11*********************@n13g2000cwa.googlegro ups.com...
Tatyana wrote:
>Hello,

I was wondering if anybody knows how to disable Email Sending on Page
Refresh.
When shopper submits the order he/she is being redirected to the receipt
page and gets the email confirmation, which is being send once the last
page
in Order Process displayed (Receipt page). Shopper is allowed to refresh
that page since the data has been inserted on the previous page. The only
problem I have is that the email is being sent every time the last page
is
refreshed. How to disable this? How to check if the page has been
refreshed?

Thank you,
Tatyana

If Session("EmailSent") Is Nothing then
'Send Email
Session("EmailSent") = True
End If

Unless you're really wanting to avoid using the Session.

Damien
Viewstate is also an option, same thing as the above just substitute
"Session" with "Viewstate"
Aug 7 '06 #3
"Mischa Kroon" <ww*@bloggingabout.netwrote in message
news:e6***************************@news.chello.nl. ..
Viewstate is also an option, same thing as the above just substitute
"Session" with "Viewstate"
But not in this particular case, obviously...
Aug 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MrMagooba | last post by:
Hi, I have a contact page that, when submit is clicked it checks the inputs then outputs to a "read only" version of the input form fromwhich the email can be sent. How would I go about changing...
5
by: Ian Murphy | last post by:
Can anyone tell me where I can find information regarding a problem I am having with w2003 ii6 and asp.net. The first page load each morning can run to 1/2hr, which as you can imagine is not...
3
by: chuckdfoster | last post by:
When using this bit of code, it sends two emails most of the time. Sometimes it doesn't send two, but most of the time it does. I put the system time (Now) in the Subject and each email has a...
2
by: TS | last post by:
when i try to do a response.flush and .end, the screen ends up blank. I want all page processing to quit when a check in the pageload event fails. Since control events occur after load, how do i...
3
by: Starbuck | last post by:
Hi I want to set a value on the initial load of a asp page and only then. What I have noticed is that every time I click on my Treeview control all of the following are called - Protected Sub...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
4
by: drec | last post by:
I currently have a script together that will display one record per page and allow the user to manually click through pages to view the next record. How can I translate this to printing the data? ...
5
by: Med | last post by:
Hi, Initial load of my pre-compiled ASP.NET app takes more than 50 seconds to load after site has been idle for a while. Then it become fairly fast. Followings are my app/hardware configs: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.