Click here to Skip to main content
15,893,487 members

Comments by Serenity1 (Top 10 by date)

Serenity1 12-May-15 2:33am View    
Any chance of re-uploading the pdf?
Serenity1 25-Apr-14 5:08am View    
Deleted
Is that thread on the client side or the server side?
Edit..
A example would be appreciated.
Serenity1 25-Apr-14 3:37am View    
Yes I have but sadly it didn't make a difference.
I believe that the problem is not the ajax but the threading of the application. I don't know why it has a 2 min delay and works afterwards but I'm pretty sure that I will need todo some threading.

I've tried Thread.Yield() (and still looking) but that doesn't allow other threads to execute.
Serenity1 24-Apr-14 14:01pm View    
No, they all successfully pass but are delayed when the big process starts (the excel import)
Edit. reply to previous q.
And they all fail? You'll want to post your code then.
Serenity1 24-Apr-14 13:55pm View    
Got the code now,
//Call back page WebForm1.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IndyIIOrga.UserControls
{
public partial class WebForm1 : System.Web.UI.Page
{
public string sessionUserCID { get { if ( Session[ "UserCID" ] != null ) { return Session[ "UserCID" ].ToString() ?? "-1"; } else { return "-1"; } } set { Session[ "UserCID" ] = value; } }

protected void Page_Load( object sender, EventArgs e )
{
Random r = new Random();
//lblTesting.Text = string.Format( "{0}", cookieUserCID.ToString() );
lblTesting.Text = string.Format( "Indy is processing excel Line number {0}", sessionUserCID );
}

}
}

//Java that call the call back page
function SessionGetCookie()
{
$.ajax(
{
url: "../../UserControls/WebForm1.aspx",
type: 'post',
dataType: 'text',
cache: false,
success: function (data, textStatus, xhr)
{
$.cookie('UserCID', $( data ).text() );
}

});
}

//Code that loops to update the label
var sessionTimeoutWarning = 1; //1 minute
var sessionTimeout = 18;
var sTimeout = parseInt(sessionTimeoutWarning) * 10 * 1000; //Regular time is meant *60*100
setTimeout('SessionWarning()', sTimeout); //Java timer function

function SessionWarning()
{
SessionGetCookie();
$("#lblPosition9162wa").text( $.cookie('UserCID') );
setTimeout('SessionWarning()', sTimeout);

}

//Label on client machine
<asp:Label ID="lblPosition9162wa" ClientIDMode="Static" runat="server" Text="9999" >