Passing Values Between Web Forms Pages

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Passing Values Between Web Forms Pages

    I am porting an old client/server application to asp.net. I used to
    retrieve data into local tables (Paradox table-files on the client's
    disk) and work on them before saving them back to the server. What is
    the approach for this in asp.net? The comments in MSDN on using the
    session object are scary, imagining that several users at the same
    time will use plenty of space on the server's memory! Or is it
    realistic to memorize the data in a page and access them from the
    following pages?
    Thank for your help!
    cgia Guest

  2. Similar Questions and Discussions

    1. Passing JavaScript values
      I've created a JavaScript that totals a column of numbers input by a site visitor. Is there a way to bring that information with me when I jump to a...
    2. passing through values
      Hello i wanna pass through the value model like this <form method="get" action="meeet.htm"> <div align="center">Nummer: <input type="input"...
    3. Passing Multidimensional Values to Forms
      On the button onclick event, How do i pass the values of a mutlidimensional array back to the form and display them in textboxes? ...
    4. [PHP] Passing Values between Pages : $_SESSION / $_GET
      My question here is " How do I get the name of the company that was passed to this script as a $_GET Parameter. I cannot use the $company because...
    5. Passing Values between Pages : $_SESSION / $_GET
      Hello All, I am using php and mysql in my application which allows users to search/query a database. The database is cast and has about 32 rows...
  3. #2

    Default Re: Passing Values Between Web Forms Pages

    There are a lot of options to transferring values between pages: Session
    like you've mentioned, The querystring (of course), But you may want to look
    into Server.Transfer and the Context Object.

    I hope this leads you in the right direction.

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche
    "cgia" <cgian31@katamail.com> wrote in message
    news:b35db8fd.0307250620.7aed635b@posting.google.c om...
    > I am porting an old client/server application to asp.net. I used to
    > retrieve data into local tables (Paradox table-files on the client's
    > disk) and work on them before saving them back to the server. What is
    > the approach for this in asp.net? The comments in MSDN on using the
    > session object are scary, imagining that several users at the same
    > time will use plenty of space on the server's memory! Or is it
    > realistic to memorize the data in a page and access them from the
    > following pages?
    > Thank for your help!

    S. Justin Gengo Guest

  4. #3

    Default Re: Passing Values Between Web Forms Pages

    You can add objects to the HttpContext of the current Page, and then use
    Server.Transfer to transfer to the next page. The HttpContext is transferred
    as well, and you can pull the data from the original page out of that.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of little things.

    "cgia" <cgian31@katamail.com> wrote in message
    news:b35db8fd.0307250620.7aed635b@posting.google.c om...
    > I am porting an old client/server application to asp.net. I used to
    > retrieve data into local tables (Paradox table-files on the client's
    > disk) and work on them before saving them back to the server. What is
    > the approach for this in asp.net? The comments in MSDN on using the
    > session object are scary, imagining that several users at the same
    > time will use plenty of space on the server's memory! Or is it
    > realistic to memorize the data in a page and access them from the
    > following pages?
    > Thank for your help!

    Kevin Spencer Guest

  5. #4

    Default Re: Passing Values Between Web Forms Pages

    Here's a nice, simple way to pass values from one page to another:
    (VB.NET code)

    'Add data to the context object before transferring
    Context.Items("myParameter") = x
    Server.Transfer("WebForm2.aspx")

    Then, in WebForm2.aspx:

    'Grab data from the context property
    Dim x as Integer = CType(Context.Items("myParameter"),Integer)

    Of course there are a number of ways to pass values from one page to
    another, such as using the querystring, cookies, session,
    context, saving to a temporary table in the database between each page, etc.
    You'll have to decide which technique is best for your application.
    Here are several good articles on the subject to help you decide.
    [url]http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx[/url]

    [url]http://www.aspalliance.com/kenc/passval.aspx[/url]

    [url]http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=600[/url]

    [url]http://www.dotnetbips.com/displayarticle.aspx?id=79[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "cgia" <cgian31@katamail.com> wrote in message
    news:b35db8fd.0307250620.7aed635b@posting.google.c om...
    > I am porting an old client/server application to asp.net. I used to
    > retrieve data into local tables (Paradox table-files on the client's
    > disk) and work on them before saving them back to the server. What is
    > the approach for this in asp.net? The comments in MSDN on using the
    > session object are scary, imagining that several users at the same
    > time will use plenty of space on the server's memory! Or is it
    > realistic to memorize the data in a page and access them from the
    > following pages?
    > Thank for your help!

    Steve C. Orr, MCSD Guest

  6. #5

    Default Re: Passing Values Between Web Forms Pages

    Actually what I want to transfer between forms is huge tables... do
    you think it is appropriate to use the server.transfer?



    [email]cgian31@katamail.com[/email] (cgia) wrote in message news:<b35db8fd.0307250620.7aed635b@posting.google. com>...
    > I am porting an old client/server application to asp.net. I used to
    > retrieve data into local tables (Paradox table-files on the client's
    > disk) and work on them before saving them back to the server. What is
    > the approach for this in asp.net? The comments in MSDN on using the
    > session object are scary, imagining that several users at the same
    > time will use plenty of space on the server's memory! Or is it
    > realistic to memorize the data in a page and access them from the
    > following pages?
    > Thank for your help!
    cgia Guest

  7. #6

    Default Re: Passing Values Between Web Forms Pages

    Yes, that seems like one of the more efficient solutions for this particular
    problem.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "cgia" <cgian31@katamail.com> wrote in message
    news:b35db8fd.0307251918.2ad13d06@posting.google.c om...
    > Actually what I want to transfer between forms is huge tables... do
    > you think it is appropriate to use the server.transfer?
    >
    >
    >
    > [email]cgian31@katamail.com[/email] (cgia) wrote in message
    news:<b35db8fd.0307250620.7aed635b@posting.google. com>...
    > > I am porting an old client/server application to asp.net. I used to
    > > retrieve data into local tables (Paradox table-files on the client's
    > > disk) and work on them before saving them back to the server. What is
    > > the approach for this in asp.net? The comments in MSDN on using the
    > > session object are scary, imagining that several users at the same
    > > time will use plenty of space on the server's memory! Or is it
    > > realistic to memorize the data in a page and access them from the
    > > following pages?
    > > Thank for your help!

    Steve C. Orr, MCSD Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139