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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    878
    Joe Smith
    Jul 23, 2004
  2. Earl Teigrob

    Global Session Variables and Session State

    Earl Teigrob, Dec 16, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    4,959
    Alvin Bruney
    Dec 17, 2003
  3. =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=

    Session Variables assigned to the wrong session?

    =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=, Jan 20, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    846
    Alvin Bruney [MVP]
    Jan 20, 2005
  4. ESmith
    Replies:
    3
    Views:
    652
    Kevin Spencer
    Oct 19, 2005
  5. Michael
    Replies:
    3
    Views:
    1,310
    Jim Cheshire
    Dec 30, 2005
  6. Replies:
    1
    Views:
    1,128
  7. Don Miller
    Replies:
    4
    Views:
    773
    Don Miller
    Feb 6, 2007
  8. Replies:
    9
    Views:
    1,316
Loading...