Passing Objects between Pages

Discussion in 'ASP .Net' started by VijayAnand, Dec 31, 2003.

  1. VijayAnand

    VijayAnand Guest

    hi all,
    In a Web Application i want to add details in a class's object
    and pass the object from one page to another page and then retrieve
    the details from the object in the latter page.how can i do this.

    VijayAnand.



    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
     
    VijayAnand, Dec 31, 2003
    #1
    1. Advertisements

  2. VijayAnand

    chanmm Guest

    use session variable

    "VijayAnand" <-spam.invalid> wrote in message
    news:3ff27702$1_2@127.0.0.1...
    > hi all,
    > In a Web Application i want to add details in a class's object
    > and pass the object from one page to another page and then retrieve
    > the details from the object in the latter page.how can i do this.
    >
    > VijayAnand.
    >
    >
    >
    > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

    News==----
    > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000

    Newsgroups
    > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

    =---
     
    chanmm, Dec 31, 2003
    #2
    1. Advertisements

  3. You can add the instance of the class to the first page's Context, and use
    Server.Transfer to transfer control to the second page. The Context is
    transferred with the execution thread, and you can then fetch the class back
    out of the Context.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "VijayAnand" <-spam.invalid> wrote in message
    news:3ff27702$1_2@127.0.0.1...
    > hi all,
    > In a Web Application i want to add details in a class's object
    > and pass the object from one page to another page and then retrieve
    > the details from the object in the latter page.how can i do this.
    >
    > VijayAnand.
    >
    >
    >
    > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

    News==----
    > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000

    Newsgroups
    > ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

    =---
     
    Kevin Spencer, Dec 31, 2003
    #3
  4. VijayAnand

    Prodip Saha Guest

    And, you must cast the session variable when you retrieve.
    eg.
    class2 test2=null;
    test2=(class2) Session["variablename"];

    Prodip

    "chanmm" <> wrote in message
    news:...
    > use session variable
    >
    > "VijayAnand" <-spam.invalid> wrote in message
    > news:3ff27702$1_2@127.0.0.1...
    > > hi all,
    > > In a Web Application i want to add details in a class's object
    > > and pass the object from one page to another page and then retrieve
    > > the details from the object in the latter page.how can i do this.
    > >
    > > VijayAnand.
    > >
    > >
    > >
    > > ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

    > News==----
    > > http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000

    > Newsgroups
    > > ---= 19 East/West-Coast Specialized Servers - Total Privacy via

    Encryption
    > =---
    >
    >
     
    Prodip Saha, Dec 31, 2003
    #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. Aidan Gill

    Passing Details between pages

    Aidan Gill, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    433
    Natty Gur
    Jul 10, 2003
  2. cgia
    Replies:
    5
    Views:
    960
    Steve C. Orr, MCSD
    Jul 26, 2003
  3. Matt M
    Replies:
    1
    Views:
    1,265
    Matt M
    Aug 28, 2003
  4. francois

    passing information between ASPX pages

    francois, Jan 9, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    657
    RAMADU
    Jan 12, 2004
  5. francois

    passing information between pages

    francois, Feb 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    440
    Michael Ramey
    Feb 3, 2004
  6. 7stud
    Replies:
    11
    Views:
    1,035
    Dennis Lee Bieber
    Mar 20, 2007
  7. ghoetker
    Replies:
    1
    Views:
    532
  8. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    3,026
    Mirronelli
    Oct 22, 2005
Loading...