G
Guest
Hi all,
I needed to have a validation to prevent someone from leaving the page if
they added anything to it. I have about 10 imagebuttons at the top of the
page for menu selections, and i wanted to have a warningmessage pop up if
they select any of those without clicking the save button first.
I put :
If session("save") = "no" then
ImageButton1.Attributes.Add("onclick", "return confirm('Are you sure you
want to exit without saving?');")
end if...
in the page load event , and it works, but it will always show this message
now.. even if they selected the save button.
I use session variables to determine if it's been clicked, and in the page
load i check to see if the session var. is what its suppose to be, but it
will still always show it nomatter what...
What should i do???
I needed to have a validation to prevent someone from leaving the page if
they added anything to it. I have about 10 imagebuttons at the top of the
page for menu selections, and i wanted to have a warningmessage pop up if
they select any of those without clicking the save button first.
I put :
If session("save") = "no" then
ImageButton1.Attributes.Add("onclick", "return confirm('Are you sure you
want to exit without saving?');")
end if...
in the page load event , and it works, but it will always show this message
now.. even if they selected the save button.
I use session variables to determine if it's been clicked, and in the page
load i check to see if the session var. is what its suppose to be, but it
will still always show it nomatter what...
What should i do???