I am writing a content management system where users can remove and
edit data. I have a datagrid with a 'remove' button on each row. If a
user clicks this (or 'add new', or 'edit') it works fine. However, if
they then press refresh on their browser, .NET attempts to repeat the
last action, which really messes things up. Is there a way to signal
NET that, for example, an OnClick event shouldn't occur again upon
refresh? Thanks. 3 2865
This is a browser feature. It repeats the last postback whatever it was. You
can't get browser to change it's behavior. You should rather implement a
sort of protection against this in your code.
Eliyahu
"kj12345" <ke********@u sa-dot-com.no-spam.invalid> wrote in message
news:41******** **@Usenet.com.. . I am writing a content management system where users can remove and edit data. I have a datagrid with a 'remove' button on each row. If a user clicks this (or 'add new', or 'edit') it works fine. However, if they then press refresh on their browser, .NET attempts to repeat the last action, which really messes things up. Is there a way to signal NET that, for example, an OnClick event shouldn't occur again upon refresh? Thanks.
What about my "add a new record" button, though? It's perfectly
reasonable for someone to add two records in a row, so it seems to be
nearly indistiguishabl e from clicking "refresh"? (Thanks for the
response anyway, that clarifies things.)
Understand. May be a timestamp could help? When adding a record, provide a
timestamp in a hidden field and store it on the server. Check the timestamp
in every new "add record" request against the previous one.
Eliyahu
"kj12345" <ke********@u sa-dot-com.no-spam.invalid> wrote in message
news:41******** @Usenet.com... What about my "add a new record" button, though? It's perfectly reasonable for someone to add two records in a row, so it seems to be nearly indistiguishabl e from clicking "refresh"? (Thanks for the response anyway, that clarifies things.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: P Mitchell |
last post by:
Hello
I would like someone to be able to help with the updating of data in a
lookup list in a subform. In short, is their a VB instruction that is the
equivalent of performing the action of going to the menu and selecting
Records and then Refresh?
or
To explain, based on a three table system where cars participate in rallies,
|
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 window to open a child window thru
javascript
window.open
2) I have some functionality in the child window that changes the data
|
by: wright |
last post by:
hello, i have a problem in refreshing a page. the problem happens when i
click a button that does a certain action in a web page, such as inserting a
record into the database, if now i refresh the page (press f5), the action
repeats itself and another identical record is inserted too.
i discovered that the button_click event is called when i refresh the page.
so the problem is that when i refresh the page, the last action that i have
done...
|
by: Paul W |
last post by:
For debugging purposes, I have the following in Page_load:
Response.Write("postback is " + IsPostBack.ToString + Now.ToLongTimeString)
i
When I view my page in IE, if I hit F5 (refresh), it tells me (as expected)
that IsPostback is False.
If I then hit a submit button on the page it tells me (as expected) that
|
by: D. Shane Fowlkes |
last post by:
This may be a very simple question but I'm stumped none the less.
I have a form where a user provides comments. There's a Grid below this
form which displays all comments in the table so far. On the Page_Load sub,
this grid is loaded. When they submit the form, a SaveComments Sub will
insert the record into a table and then disable the button and textbox
(greyed out) and display a message in a asp:label saying "thank you...".
The last...
| |
by: Amelyan |
last post by:
How do you prevent browser "Refresh" action from repeating the last
operation (e.g. button click event) of my aspx page?
|
by: Mr Newbie |
last post by:
Before someone flames me, I know this is the VB.NET groups, nonetheless, the
asp.net guys seems to have almost disapeared from the aspnet groups so I
thought I would ask this here.
I have a problem with an aspx web form in that if I refresh, it simply
resubmits the form and causes multiple submissions, in this case the form is
one which adds records to the database and refreshing a previously submitted
item repeats each time the refresh...
|
by: =?Utf-8?B?TWlrZQ==?= |
last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked,
and then I refresh the page (ie, by pressing F5 key), why does the same event
occur when I press F5 as it did when I clicked the button?
For example - On an ASP.NET webform I click a button which produces a
postback and a Button.Click event. After the postback, I press F5 to refresh
my webform, which executes Button.Click again.
Is there a way to prevent the...
|
by: Piotr Nowak |
last post by:
Hi,
Say i have a server process which listens for some changes in database.
When a change occurs i want to refresh my page in browser by notyfinig it.
I do not want to refresh my page i.e. every 5 seconds, i just want to
refresh it ONLY on server change just like desktop applications do.
The problem is that refreshing evry n seconds has to much impact on my
web server. The refresh action should be taken only when something
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |