473,322 Members | 1,307 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,322 software developers and data experts.

Caching in a MCMS page

Hi,

I originally posted this question in the Microsoft Content Management Server
(MCMS) newsgroup but was told to post here.

In my MCMS site, I've written an "admin" page that sends out emails to a
list of subscribers. Everything is working fine, but if the admin user
happens to click refresh after the '000s emails have been sent, they will be
sent again. Obviously not good. I'm using some javascript to initially prompt
the user "are they sure" and then set the value "Y" or "N" in a hidden
textbox. After the emails have been sent (at the end of the click event) I
set this value back to "N".

If I overload LoadViewState and SaveViewState and step
through these events, I can see my textbox being set to "N" after the email
send, then, on the refresh it becomes empty string and then "Y" again.

I have also tried
"Page.Response.Cache.SetCacheability(HttpCacheabil ity.NoCache);" in the
page_load event.

What do I have to do to make refresh function like the page had just been
hit for the first time. Can anyone assist me with this?

Thanks,
Anthony
Mar 29 '06 #1
1 1198
DWS
Anthony,

There is no way to tell exactly when a user will press the browser refresh
button. They just press it when ever they feel like and you have to be ready
for it. The state changes your seeing ('m using my power to divine code) is
refresh is loading the initial value in the page_load event or page_init if
its hard coded in the aspx or ascx.

Permanent soultion persist if the emails have been sent on the server. Use
this persisted info to determine when to send the emails, how the page looks
when it is loaded (refreshed), etc. set it when sending emails of course,
How you clear it is up to you.

Good Luck
DWS

"Anthony" wrote:
Hi,

I originally posted this question in the Microsoft Content Management Server
(MCMS) newsgroup but was told to post here.

In my MCMS site, I've written an "admin" page that sends out emails to a
list of subscribers. Everything is working fine, but if the admin user
happens to click refresh after the '000s emails have been sent, they will be
sent again. Obviously not good. I'm using some javascript to initially prompt
the user "are they sure" and then set the value "Y" or "N" in a hidden
textbox. After the emails have been sent (at the end of the click event) I
set this value back to "N".

If I overload LoadViewState and SaveViewState and step
through these events, I can see my textbox being set to "N" after the email
send, then, on the refresh it becomes empty string and then "Y" again.

I have also tried
"Page.Response.Cache.SetCacheability(HttpCacheabil ity.NoCache);" in the
page_load event.

What do I have to do to make refresh function like the page had just been
hit for the first time. Can anyone assist me with this?

Thanks,
Anthony

Mar 29 '06 #2

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

Similar topics

0
by: Nongetjie | last post by:
Hi, I'm currently busy with developing a website in MCMS 2002. On this website I need to have a reaction form, from which the input needs to be mailed to an emailadress. I've tried the...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
0
by: Troy Simpson | last post by:
Hi, I have a website which is made up of dynamic pages. Each page that's loaded has some code which looks at which template to load amongst other things, which causes the page to take a little...
3
by: Janaka | last post by:
Hi All, I'm having a problem with Page Output caching on a page that contains a DataGrid. Basically the page pulls up some data for sales information from the DB. Some of this has to be...
1
by: jademoon | last post by:
I am having problems since we built a new Exchange Server 2003 (member server) and removed the Exchange 2000 (member server) from out network. The error comes about when an MCMS Author "submits" a...
3
by: DC | last post by:
Hi, (ASP.Net 1.1) is it possible to (programmatically and globally) deactivate page fragment caching? We have only two scenarios, development stage where we want caching off and testing where we...
0
by: michdoh | last post by:
HI All We are running mcms 2002 on framework 1.1 SQL 2000 on windows 2000 servers. It's a load balanced pair of servers using windows NLB writing the session to an SQL shared DB. We are...
3
by: Purti Malhotra | last post by:
Hi All, In our Web hosting environment we are using Virtual hosting i.e. multiple websites are on one server and multiple domains are pointing to a single website. Issue: We have two domains...
3
by: Mark B | last post by:
I have an MCMS website that I inherited. It was originally built in .NET 1.1 and then ported to .NET 2.0. They built it with inherited base classes to mimic what is now done with master pages. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.