Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8505277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:16:22+00:00 2026-06-11T02:16:22+00:00

Hello I have a Session ID variable I’m passing through from on Oracle package

  • 0

Hello I have a Session ID variable I’m passing through from on Oracle package into an asp page. What I want to do is hold on to that variable and pass it back to Oracle through a different call. I would think this should be easy but I lose the variable value.

Everything else in the solution is working perfectly. It’s just a small addition.

I’m not too sure how much information is too much or too little on this question but basically I have a connection class with different methods to call different procs in Oracle. Each one is called by pressing one of two buttons on the asp page.

One method (on button click) will pass in the Session ID (along with cursor results that exist in a permanent Oracle table).

The asp page then displays the cursor results.

The second method (on button click) then calls a proc in Oracle to pass whatever exists in that table to another Table based on the Session ID.

In order to ensure the right contents are passed I need the asp page to hold on to the session id (I got this far) then pass it back to Oracle on a different call.

in the declaration we have

private string outSessionID;

    public string OutSessionID
    {
        get { return outSessionID; }
        set { outSessionID = value; }
    }

section of the connection method that sets the parameter

addDbParameter(ref cmd, "outSession_ID", DbType.String, ParameterDirection.Output, null);

addDbParameter(ref cmd, "rc1", DbType.Object, ParameterDirection.Output, null);

 outSessionID = cmd.OutParameter<String>("outSession_ID");

in second method we have

addDbParameter(ref cmd, "inSession_ID", DbType.String, ParameterDirection.Input, OutSessionID);

I’m new to ASP so any insight on why this information is lost is appreciated. I think it has something to do with a postback being a new session or something but I’m not precisely sure.

I”ll be happy to extrapolate with more code but don’t want to provide anything unnecessary.

Thanks.

Just to add that in the end I added a small method that collected the sessionId in the aspx.cs then called that method after ther postback. All the troubles occurred when trying to set the value within the pre-init to page_load methods. By calling a separate method after the click events I was able to save and recall the sessionid successfully.

Thanks for the responses, they were very helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:16:24+00:00Added an answer on June 11, 2026 at 2:16 am

    If that information is not security-prone, one approach is you can have a hidden field on your asp.net page. NOTE: the user can view the source of your page and see the content of the hidden field

    <as:HiddenField runat="server" ID="MySessionID" />
    

    Then after getting your sessionId you can store it

    MySessionID.Value = outSessionID;
    

    and to use it later

    outSessionID = MySessionID.Value;
    

    Here is another trick

    public string OutSessionID
    {
        get { return ViewState["outSessionID"].ToString(); }
        set { ViewState["outSessionID"] = value; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have a comet-like iframe on my page, but when the session
Hello i have 2 arrays and and i want to put them in a
hello all i want to retrieve my all the wall post that i have
I have a Linux box and I want to be able to telnet into
I have following code in my bootstrap protected function _userSession(){ $session=new Zend_Session_Namespace(userIdentity); $session->greet=Hello!!!!!; Zend_Registry::set(session,
I have an ashx handler and want to clear the session on request. I
Possible Duplicate: Ajax, javascript send variable to another page, on click Hello, Lets say
I have 2 scripts/pages, both using session data. Page 1 is a table with
Hello everybody I have a LINQ declaration like this : var query = from
Hello i got a question, i have a session array called 'addToCart', in there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.