Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2007, 05:11 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error when refresh the page!

Hi all,

My problem is:
I put a javascript code in my aspx page to open alert when the user click button,
when the alert appears in the page after clicking the button,
it will always appear again every time the user Refresh the page??

What should I do?
Thanks.

 
Old June 6th, 2007, 06:52 AM
Authorized User
 
Join Date: Aug 2004
Location: Delhi, Delhi, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Prabhakar_dt
Default

Please post ur code part so anyone can check and reply.

Thx

Prabhakar Kumar
 
Old June 6th, 2007, 08:00 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There is not much you can do to prevent that. If the user refreshes the page, then they'll get exactly what they got last time, including the alert. You could use AJAX on the page in question and fire the client side code after callbacks. When the user refreshes the page they'll be refreshing the page in the original state which didn't have the alerts or other dynamic events triggered by AJAX activities.

-Peter
 
Old June 6th, 2007, 08:32 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks

but can u give me a small example of AJAX





Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Refresh on first postback slim182 ASP.NET 2.0 Basics 4 February 20th, 2007 08:22 PM
Parent Page Refresh crmProg Visual Studio 2005 1 February 9th, 2007 09:56 AM
Need to "Refresh" page fskilnik Dreamweaver (all versions) 3 October 20th, 2005 10:49 AM
page Refresh skicrud PHP How-To 2 August 25th, 2004 04:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.