About transferring session variables...

Discussion in 'ASP .Net' started by Hanumant Ganpat, Feb 9, 2010.

  1. I am working on webdevelopment using ASP.NET with C#. I am trying to
    transfer page from one application to another application page.I have to
    access session variables from last application into new transferred
    page.How can I do?
    If any one have any idea Please help me....!!



    *** Sent via Developersdex http://www.developersdex.com ***
     
    Hanumant Ganpat, Feb 9, 2010
    #1
    1. Advertising

  2. Hanumant Ganpat

    Hillbilly Guest

    //Page1.aspx
    Session["FirstName"] = FirstNameTextBox.Text;

    //Page2.aspx
    string firstName = Session["FirstName"].ToString();

    --or--

    //Page1.aspx
    Session["NumberOfBitchyGirlfriends"] = 3;

    //Page2.aspx
    int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];

    NOTE: since you may --literally-- mean you want to transfer data from one
    application to another we cannot use Application2 to access the Session
    generated in Application1. If Application2 is in the same domain as
    Application1 (mywebsite.com for example) we can then write a cookie in
    Application1 to mywebsite.com that contains the Session variable and then
    read the cookie from Application2 that also exists in the same domain
    mywebsite.com; if not the same domain use the database or an XML file to
    store the data as required.



    "Hanumant Ganpat" <> wrote in message
    news:...
    >I am working on webdevelopment using ASP.NET with C#. I am trying to
    > transfer page from one application to another application page.I have to
    > access session variables from last application into new transferred
    > page.How can I do?
    > If any one have any idea Please help me....!!
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
     
    Hillbilly, Feb 9, 2010
    #2
    1. Advertising

  3. Hanumant Ganpat

    Scott M. Guest

    "Hillbilly" <> wrote in message
    news:...

    > int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];


    Hmmm.
     
    Scott M., Feb 9, 2010
    #3

  4. > //Page1.aspx
    > Session["NumberOfBitchyGirlfriends"] = 3;
    >
    > //Page2.aspx
    > int bitchbitchbitch = (int)Session["NumberOfBitchyGirlfriends"];
    >


    Hahahahaha....
     
    deveti putnik, Feb 10, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    10
    Views:
    751
    Joe Smith
    Jul 23, 2004
  2. Jack Fox
    Replies:
    0
    Views:
    327
    Jack Fox
    Dec 2, 2003
  3. =?Utf-8?B?UmFuamFuIGFzIHVzdWFs?=

    Transferring ASP .net program from test box to server

    =?Utf-8?B?UmFuamFuIGFzIHVzdWFs?=, May 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    268
    Chad A. Beckner
    May 27, 2004
  4. ESmith
    Replies:
    3
    Views:
    518
    Kevin Spencer
    Oct 19, 2005
  5. Don Miller
    Replies:
    4
    Views:
    592
    Don Miller
    Feb 6, 2007
Loading...

Share This Page