question

stevenc-5586 avatar image
0 Votes"
stevenc-5586 asked YijingSun-MSFT commented

Could Hashtable and SortedList Clear its key and value while closing browser / leaving to another page / session closed ?

Hello ,

      Just wondering Could Hashtable and SortedList Clear its key and value while closing browser / leaving to another page / session closed ?
dotnet-aspnet-webpages
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YijingSun-MSFT avatar image
0 Votes"
YijingSun-MSFT answered

Hi @stevenc-5586 ,
I think,there is no possible to clear the hashtable's key and value when you are closing the broswer.
As far as I think,if you want to clear the hashtable's key and value before closing the broswer, you need send ajax request before closing the broswer. Since you could use "unload" or "beforeunload" javascript event, these are not reliable for an Ajax request. So, I think you couldn't clear the hashtable's key and value when you are closing the broswer.

Best regards,
Yijing Sun


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

stevenc-5586 avatar image
0 Votes"
stevenc-5586 answered YijingSun-MSFT commented

kay, how does the hashtable & sortedList actually clear its data? when pc shut down? where does it resides with its data in client's pc?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @stevenc-5586 ,
why you need to clear the data of the hashtable? I suggest you could use session if you need to clear the data when you close the broswer.
Best regards,
Yijing Sun

0 Votes 0 ·