Web Page Event causes page to refresh twice ?

M

michaeltorus

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top