locked
How do I pass OUT parameters to a .NET function from JScript.Net? RRS feed

  • Question

  • Hello,

     

    I'm trying to call the SessionIDManager.SaveSessionID Method from my JScript code. However when I call the method I get an 'Compiler Error Message: JS0013: Type mismatch' error.

    I guess this is because the method's last 2 parameters are OUT parameters? How would I go about doing this then? This is how I'm calling the method from my JScript code:

     

    function Test() {

    var Manager = new SessionIDManager();

    var NewID = Manager.CreateSessionID(Context);

    var OldID = Context.Session.SessionID;

     

    var redirected = false;

    var IsAdded = false;

    Manager.SaveSessionID(Context, NewID, redirected, IsAdded);

    Response.Write("Old SessionId Is : " + OldID);

    if(IsAdded) {

    Response.Write("<br/> New Session ID Is : " + NewID);

    }

    else {

    Response.Write("bla");

    }

    }

    Monday, May 16, 2011 9:47 AM