storing the datatable into the session?

Discussion in 'ASP .Net' started by angus, Jul 8, 2004.

  1. angus

    angus Guest

    Dear All,

    my problem is that,

    i have a table to display, and, it allows the user to enter a new unit in
    the text box

    e.g.

    *original table (empty)*

    unit
    --------

    *user enter "cm" in the textbox add press enter*

    unit
    -------
    cm

    *user enter "mm" in the textbox add press enter*

    unit
    --------
    cm
    mm

    in this case, i won't store the above data to the database until the user
    press a "submit all unit" button

    I have declared a globel variable for the DataTable to store the above
    records

    my problem is that

    if the user presses the add button, the page will be refreshed. and the
    previous added rows in the globel datatable will display

    Is it a good practice to store the datatable into the session, so that i can
    get the previous added rows?

    if not so, would you please suggest a good way to do this.

    Thank you.


    Regards,
    Angus
     
    angus, Jul 8, 2004
    #1
    1. Advertising

  2. angus

    Edward Guest

    try MS.PetShop , what you said sounds like Shop Cart.


    > Dear All,
    >
    > my problem is that,
    >
    > i have a table to display, and, it allows the user to enter a new unit in
    > the text box
    >
    > e.g.
    >
    > *original table (empty)*
    >
    > unit
    > --------
    >
    > *user enter "cm" in the textbox add press enter*
    >
    > unit
    > -------
    > cm
    >
    > *user enter "mm" in the textbox add press enter*
    >
    > unit
    > --------
    > cm
    > mm
    >
    > in this case, i won't store the above data to the database until the user
    > press a "submit all unit" button
    >
    > I have declared a globel variable for the DataTable to store the above
    > records
    >
    > my problem is that
    >
    > if the user presses the add button, the page will be refreshed. and the
    > previous added rows in the globel datatable will display
    >
    > Is it a good practice to store the datatable into the session, so that i

    can
    > get the previous added rows?
    >
    > if not so, would you please suggest a good way to do this.
    >
    > Thank you.
    >
    >
    > Regards,
    > Angus
    >
    >
     
    Edward, Jul 8, 2004
    #2
    1. Advertising

  3. angus

    angus Guest

    hmm, i am not sure if i unstanding what is MS.PetShop

    could you please post the link here

    thanks a lot


    "Edward" <> wrote in message
    news:%...
    > try MS.PetShop , what you said sounds like Shop Cart.
    >
    >
    > > Dear All,
    > >
    > > my problem is that,
    > >
    > > i have a table to display, and, it allows the user to enter a new unit

    in
    > > the text box
    > >
    > > e.g.
    > >
    > > *original table (empty)*
    > >
    > > unit
    > > --------
    > >
    > > *user enter "cm" in the textbox add press enter*
    > >
    > > unit
    > > -------
    > > cm
    > >
    > > *user enter "mm" in the textbox add press enter*
    > >
    > > unit
    > > --------
    > > cm
    > > mm
    > >
    > > in this case, i won't store the above data to the database until the

    user
    > > press a "submit all unit" button
    > >
    > > I have declared a globel variable for the DataTable to store the above
    > > records
    > >
    > > my problem is that
    > >
    > > if the user presses the add button, the page will be refreshed. and the
    > > previous added rows in the globel datatable will display
    > >
    > > Is it a good practice to store the datatable into the session, so that i

    > can
    > > get the previous added rows?
    > >
    > > if not so, would you please suggest a good way to do this.
    > >
    > > Thank you.
    > >
    > >
    > > Regards,
    > > Angus
    > >
    > >

    >
    >
     
    angus, Jul 8, 2004
    #3
  4. angus

    Scott Allen Guest

    You can download the PetShop app from
    http://www.gotdotnet.com/team/compare/petshop.aspx.

    --
    Scott
    http://www.OdeToCode.com

    On Thu, 8 Jul 2004 14:31:17 +0800, "angus" <> wrote:

    >hmm, i am not sure if i unstanding what is MS.PetShop
    >
    >could you please post the link here
    >
    >thanks a lot
    >
    >
    >"Edward" <> wrote in message
    >news:%...
    >> try MS.PetShop , what you said sounds like Shop Cart.
    >>
    >>
    >> > Dear All,
    >> >
    >> > my problem is that,
    >> >
    >> > i have a table to display, and, it allows the user to enter a new unit

    >in
    >> > the text box
    >> >
    >> > e.g.
    >> >
    >> > *original table (empty)*
    >> >
    >> > unit
    >> > --------
    >> >
    >> > *user enter "cm" in the textbox add press enter*
    >> >
    >> > unit
    >> > -------
    >> > cm
    >> >
    >> > *user enter "mm" in the textbox add press enter*
    >> >
    >> > unit
    >> > --------
    >> > cm
    >> > mm
    >> >
    >> > in this case, i won't store the above data to the database until the

    >user
    >> > press a "submit all unit" button
    >> >
    >> > I have declared a globel variable for the DataTable to store the above
    >> > records
    >> >
    >> > my problem is that
    >> >
    >> > if the user presses the add button, the page will be refreshed. and the
    >> > previous added rows in the globel datatable will display
    >> >
    >> > Is it a good practice to store the datatable into the session, so that i

    >> can
    >> > get the previous added rows?
    >> >
    >> > if not so, would you please suggest a good way to do this.
    >> >
    >> > Thank you.
    >> >
    >> >
    >> > Regards,
    >> > Angus
    >> >
    >> >

    >>
    >>

    >
     
    Scott Allen, Jul 8, 2004
    #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. J. Babe
    Replies:
    1
    Views:
    8,378
    Kevin Spencer
    Aug 15, 2003
  2. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,081
    paul.mariotti
    Sep 28, 2007
  3. =?Utf-8?B?Qmx1ZWZsb3dlcg==?=

    Casting DataTable to class inherit from DataTable

    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,010
    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=
    Apr 2, 2004
  4. Jason
    Replies:
    6
    Views:
    7,484
    Ksenia
    Nov 1, 2005
  5. =?Utf-8?B?YmFzdWxhc3o=?=

    Storing a datatable (or arraylist )on ASP.NET Session

    =?Utf-8?B?YmFzdWxhc3o=?=, Jun 16, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    9,557
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=
    Jun 17, 2007
Loading...

Share This Page