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

Web Page Event causes page to refresh twice ?

I'm working on an .net 1.1 web app that someone else has designed, so I'm trying to figure out if whatt he is saying about some strange behaviour is something he's done wrong, or can be fixed.

So, let's say you have a page with a grid on it. and the grid is editable, and has a button to post back to the server to perform an update on a row.

When you click on it, it appears refresh the page twice which he says is unavoidable.

It posts back to the server and first retrieves the data for the data grid (before the update method is called), then, once the controll is built, it then runs the event fo the button that was clicked. This performs the update, but, if nothing is done the page comes back with the OLD dataset, before the update method was called .... so basically, ends up ding a :

<%
window.location = window.location;
%>

which then refreshes the page and fetches an up to date dataset ...

No matter how much a hear it and look at it, it seems CRAZY that M$ have made asp.Net work in this way ???? For every Create, update & Delete on every page in our application it will fetch the data twice ????
I desperately want to fix this, but where do I start ?

Thanks

Mike

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 25 '05 #1
0 1288

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

Similar topics

5
by: Tim | last post by:
I have block of code adding values to dropdown list under if (!Page.IsPostBack) { adding items } else { refreshing data }
2
by: msnews.microsoft.com | last post by:
It appears myButton_OnClick is triggering in my user control AFTER its parent's Page_Load already runs. Is there a way to make the parent Page_Load to run afterwards? I'm changing a session...
0
by: Oz | last post by:
Hi Using VS.NET 2003, Windows XP SP1, We have a page which has been developed using ASP.NET. On it, is a button which when clicked is supposed to add some data to a table. When the button is...
5
by: Peter Rilling | last post by:
I have an interesting issues that, although I not blocking me, is not very performance. Maybe someone can suggest a better way of doing this. 1) I have a page that displays a grid with command...
6
by: Dee | last post by:
Hi The paging numbers of my DataGrid dont actually page. What can be the cause? Everyting else seems to work. Thanks Dee
8
by: TS | last post by:
Hi, i have inherited a page from another user. The page is the target frame in a frameset. for some reason the whole page runs twice (page_load, init, etc. all run twice) I can't figure out how...
3
by: Chris Tomlinson | last post by:
Hi all, I hope someone is able to help me out with a small problem with this page: http://www.superhighstreet.com/George-Street-Richmond/index.shtml I have a small iframe (mid-right) with an...
1
by: Areric | last post by:
Hey all, Does anyone know how i can detect a refresh of the page in the unload event on the server? The problem I'm having is that refresh automatically calls the previous event that happened...
4
by: archana | last post by:
Hi all, I am new to asp.net. Developing one web page. What i observed is at a time of refreshing page click event is firing twice. On some pc its not happening. But its not happening for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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...

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.