Hi BenHolcombe,
You can try the example below, it shows you how to keep activating the session in API "CuteWebUI_AjaxUploader_OnStop" and "CuteWebUI_AjaxUploader_OnStart".
- <%@ Page Language="C#" %>
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>example</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div class="content">
- Debug:
- <input type="text" readonly="readonly" id="output" style="width: 400px" />
- <p>
- <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Browse Files"
- InsertButtonID="BrowseButton">
- </CuteWebUI:Uploader>
- </p>
-
- <script type="text/javascript">
- var output=document.getElementById("output");
- var keepsessionurl="test.aspx";
-
- var keeptimeout=180000;
- var keeptimerid;
-
- keeptimeout=3000;
-
- function keeponce()
- {
- keeptimerid=setTimeout(keeponce,keeptimeout);
-
- output.value="send request"
-
- var xh=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
- xh.open("GET",keepsessionurl,true);
- xh.onreadystatechange=function()
- {
- if(xh.readyState<4)return;
-
- output.value="recieved "+xh.status+" , "+new Date().getTime()
- }
- xh.send();
-
- }
-
- function CuteWebUI_AjaxUploader_OnStart()
- {
- output.value="start"
- clearTimeout(keeptimerid);
- keeptimerid=setTimeout(keeponce,keeptimeout);
- }
- function CuteWebUI_AjaxUploader_OnStop()
- {
- output.value="stop"
- clearTimeout(keeptimerid);
- }
-
- </script>
-
- </div>
- </form>
- </body>
- </html>
regards,
Ken