Save Textbox value on unload c#

I would like to save the contents of a textbox whenever the browser is closed or page is navigated away from. I tried several methods such as page_unload and onclose but I can never seem to get the value. Thanks for nay help.
Who is Participating?
vs1784Connect With a Mentor Commented:
There is no perfect solution of it
But you can try this
You need to capture the event of browser close in Javascript and pass it to your server.

pase_unload wont get fired while closing the browser.

Hope it helps

B_P_BAuthor Commented:
Do you have an example I could work from?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.