Reputation: 13250
I would like to know how to close session with a Jquery UI tab click in asp.net.
Actually I am working with upload Images and when user upload I am saving them under a folder with genrated random string value.
So I need to close the session with a tab click as I am having problem when the user refreshes and tries to upload I'm getting error as the session is not clearing.
Here is my Javascript code:
<script type="text/javascript">
// Convert divs to queue widgets when the DOM is ready
$(function () {
var tempDir = randomString(8);
document.getElementById("currentDirectory").value = tempDir;
$("#uploader").plupload({
// General settings
runtimes: 'gears,flash,silverlight,browserplus,html5',
url: 'upload.aspx?xyz=' + tempDir,
max_file_size: '10mb',
max_file_count: 10,
chunk_size: '1mb',
unique_names: true
});
</script>
Here is the Jquery UI tab code:
<div id="tabs">
<ul>
<li><a href="#tabs-1">
<li><a href="#tabs-2">
<li><a href="#tabs-3">
</ul>
<div id="tabs-1">
</div>
<div id="tabs-2">
</div>
<div id="tabs-3">
</div>
</div>
Upvotes: 0
Views: 562
Reputation: 148524
you should have an ajax call to an ASHX file with *IRequiresSessionState * Interface
and there you should use the session abandon.
Upvotes: 1