Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,
The application contains a aspx page names as test1.aspx. Every time i am Loading this page i am getting the true or false values in the Boolean Variable ( variable name:isSave). suppose if i navigating from test1.aspx page to some other aspx pages in that application i need to check the boolean variable. if the boolean variable has false i dont want to do anything. if the boolean variable has false i need to show the confirm alertbox


Thanks
M.Dhanasekaran
Posted
Updated 12-Apr-11 2:49am
v2

You mean like codeproject does when you try to browse away from entering a message without clicking the button to submit?

Ask Chris how he handled that on this site, because it does what I *think* you want to do.

Of course, there's no protection from the user simply closing the browser window, so is all this effort really worth it?
 
Share this answer
 
Comments
musefan 12-Apr-11 8:55am    
Actually, you can't even close tab/browser without the prompt (I am using Chrome) - obviously I could still force kill the application
dhanasekaranm 12-Apr-11 8:58am    
Hi,
In that Applcation contains home ,about us,log off menu items.. Home button is linked with home.aspx and about us linked with the aboutus.aspx. if i navigate from home.aspx page to aboutus.page i need to show the confirm messge
if the boolean variable has false i dont want to do anything. if the boolean variable has false i need to show the confirm alertbox
Why you need to handle unload event for this?

You have various state management techniques. Use any one. Try Session or QueryString.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900