473,396 Members | 2,147 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,396 software developers and data experts.

Problems during reload/refresh

Hi,

i have done a shopcart application and I have the following problem:

The event "itemcommand" (Datalist.button) is fired every single time the
user reloads/refreshes the page (after he once pressed the right button).
Postback is always true (cause this error occurs only after the user once
pressed this button) so that´s not the way. Is there any other event raised
when a user reloads his page? Or how can I get rid of this? pls help

thx
Hans
Nov 18 '05 #1
2 1110
I have to add that it seems that a pagereload by the user raises the
itemcommand again so there must be a chance to avoid this (I hope) :D

Hans
Nov 18 '05 #2
Hans,

I'm not certain if this proposed solution would work for you or not.

Here's what's happening: Every time you click an <asp:button you are posting
form data back to the server. When a user refreshes the page that form data
is posted to the form data is reposted. Thus every time a user refreshes the
page after the first post the button is pressed again because it's now part
of the form post.

You could get rid of this by doing a Response.Redirect back to the same page
after the intitial button click. But of course that will make it seem as if
the user is entering the page for the first time. So if the button click is
changing the page layout you could have a problem there.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Hans Meier" <hm@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I have to add that it seems that a pagereload by the user raises the
itemcommand again so there must be a chance to avoid this (I hope) :D

Hans

Nov 18 '05 #3

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

Similar topics

1
by: Cooper | last post by:
Hello, is possible to disable the reload (or update, for ie) of the a web page? If yes, what i do? Otherwise if isn't possible, what i do for to set the default value of a form when a user do a...
2
by: Bilal | last post by:
Hi, I'm a complete beginner in Javascript and php ... so forgive me for asking an easy/simple solution to the following problem: I'm developing an application that involves multi-screen in...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
3
by: francois | last post by:
I have an aspx page that needs to reload itself every x seconds. X is a parameter retrieve from the DB or the web.config file, just to point out that it will not be hardcoded. I need to refresh...
18
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
8
by: T. Wintershoven | last post by:
Hi all, Is there a simple way in php to reload a page coded within an if statement.(see code below) It's very important that the session stays intact. The filename is RCStudent.php ...
2
by: ericisjusteric | last post by:
I have a page with multiple iframes and need to have the user (ie6) be able to click a button to refresh any one of the iframes - but also to click another button at the top of the page to refresh...
2
by: RobertTheProgrammer | last post by:
Okay, here's another one for you. Hopefully I can articulate my problem well enough... I've got a GridView (with C# code behind) that is having some page load issues. Users can enter and...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.