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

Magic Trick Datagrid Delete Row

I have found many cases in that after a row has been deleted from a datagrid
using a linkbutton and then hit the browser refresh button the row previous
to the origianal delete will as well be removed if there is one. I have
attempted to track the refresh in a session variable, but in all honesty
would like to disable the refresh button/F5 on ie.
Any thoughts
Nov 19 '05 #1
3 1201
This is how the browser works. If you hit refresh you're asking the browser
to do what it just did. If that's a post, it warns you but you're sentiment
is correct, since no one reads or understands the warning. The best way to
avoid the user refreshing and reposting is to Response.Redirect(Request.Path)
which causes a GET. Then a refresh is just another GET of the page.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have found many cases in that after a row has been deleted from a
datagrid
using a linkbutton and then hit the browser refresh button the row
previous
to the origianal delete will as well be removed if there is one. I
have
attempted to track the refresh in a session variable, but in all
honesty
would like to disable the refresh button/F5 on ie.
Any thoughts


Nov 19 '05 #2
So, how do I change that one control to get. If i changed the form attribute
the rest of my controls will not work? I am an entrylevel programmer and use
vs.net to create event handlers.

c#dev

"Brock Allen" wrote:
This is how the browser works. If you hit refresh you're asking the browser
to do what it just did. If that's a post, it warns you but you're sentiment
is correct, since no one reads or understands the warning. The best way to
avoid the user refreshing and reposting is to Response.Redirect(Request.Path)
which causes a GET. Then a refresh is just another GET of the page.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have found many cases in that after a row has been deleted from a
datagrid
using a linkbutton and then hit the browser refresh button the row
previous
to the origianal delete will as well be removed if there is one. I
have
attempted to track the refresh in a session variable, but in all
honesty
would like to disable the refresh button/F5 on ie.
Any thoughts


Nov 19 '05 #3
I am sorry, I read your reply to fast(hopefully a bigginer thing) but that
worked great thank you so much!!!!

c#dev

"Brock Allen" wrote:
This is how the browser works. If you hit refresh you're asking the browser
to do what it just did. If that's a post, it warns you but you're sentiment
is correct, since no one reads or understands the warning. The best way to
avoid the user refreshing and reposting is to Response.Redirect(Request.Path)
which causes a GET. Then a refresh is just another GET of the page.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have found many cases in that after a row has been deleted from a
datagrid
using a linkbutton and then hit the browser refresh button the row
previous
to the origianal delete will as well be removed if there is one. I
have
attempted to track the refresh in a session variable, but in all
honesty
would like to disable the refresh button/F5 on ie.
Any thoughts


Nov 19 '05 #4

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

Similar topics

5
by: Mojtaba Faridzad | last post by:
Hi, with SetDataBinding( ) a DataGrid shows a DataView. user can select some rows in the grid by holding cotrol key. when user clicks on Delete button, I should delete all selected rows. I am...
5
by: BBFrost | last post by:
Win2000 ..Net 1.1 SP1 c# using Visual Studio Ok, I'm currently in a "knock down - drag out" tussle with the .Net 1.1 datagrid. I've come to realize that a 'block' of rows highlighted within...
3
by: Ryan Liu | last post by:
Hi there, I got a NullReferenceException when delete last row in a datagrid. I had hard time to solve since it does not occur in my own code. I put a datagrid in my inherited user control,...
0
by: shamila | last post by:
</asp:label><asp:datagrid id="DataGrid3" runat="server" cssclass="DataGrid" showfooter="True" onupdatecommand="DataGrid3_Update"ondeletecommand="DataGrid3_Delete" oneditcommand="DataGrid3_Edit"...
2
by: Marty McDonald | last post by:
When setting certain datagrid properties with the IDE (as in the property window), they don't seem to take effect. For instance, Font Name. So I have to set these via code-behind at the cell...
0
by: Steve | last post by:
I have a datagrid that is created at run time DataGrid dgG = new DataGrid(); BoundColumn bcB; dgG.CellPadding = 5; dgG.CellSpacing = 0; dgG.GridLines = GridLines.Both; dgG.CssClass =...
2
by: Lars Netzel | last post by:
Hi What events are there to do things in when I am on a row in a datagrid (bound from a dataset) and press Delete key... There's no Delete Event on the drig and I can't figure out if there are...
2
by: Nina | last post by:
Hi there, I've tried everything that I know to prevent usre resizing datagrid columns, but nothing works. Following are the code that I used. Please tell me what's wrong with them. Thank you....
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
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
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
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...
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...
0
agi2029
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,...
0
isladogs
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...
0
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...

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.