this is just simple javascript. create a variable that is updated on any
value changed (by attaching script to the onchange event of each control).
the following is air code
<body onunload="return doConfirm()" onsubmit="changesSaved =true;">
<script>
var changesSaved = true;
function doConfirm() {
if (changesSaved ) return window.confirm("You have not saved you
changes, cancel navigate?");
return true;
}
</script>
<input type=text onchange="changesSaved =false;">
note: at form load, with client script you could attach the onchange handler
(be sure to delegate any existing routines).
-- bruce (sqlwork.com)
"David" <dl*****@lifetimeinc.com> wrote in message
news:eS****************@TK2MSFTNGP05.phx.gbl...
Using VS2005 and .Net 2.0
I want to be able to keep the user from moving to another web page if they
have selected the "Edit" link button on a FormView (or any view for that
matter), have changed any of the data in bound controls and do not click
on the "Update" link button. Can anyone help? Thanks.
David