Updating a DB

Discussion in 'ASP .Net' started by ProgramAnalyst, Oct 14, 2004.

  1. hey all,

    I've just spent the day creating a page that displays records from a
    DB in a table. Each record has its own table and when u click the
    "edit" button the fields become enabled and what I would like is that
    when u click the "save" button the DB gets updated.

    Since tables dont have viewstate a co-worker of mine suggest that each
    control in the table should be placed in an arrayList so they can
    easily be accessed. I went ahead and did this and finised the page.

    the problem: Any changes u make to the page before hitting "save" dont
    stay because I have to recreate the tables so all the old info is
    loaded in. If I dont recreate the tables then all my arrayLists are
    empty (why i dont know because the arrayLists have global scope)...

    does anyone know what I must do to fix it so my arrayLists dont get
    emptied?

    Thanks in advance.

    *-----------------------*
    Posted at:
    www.GroupSrv.com
    *-----------------------*
    ProgramAnalyst, Oct 14, 2004
    #1
    1. Advertising

  2. ProgramAnalyst

    ESPN Lover Guest

    Try this example.

    http://tripleasp.net/tutorial.aspx?navid=25

    It's very cool in how it displays the entry fields. You could always have
    each of the entry fields in each column as is normally done.

    "ProgramAnalyst" <-spam.invalid> wrote in
    message news:416eda35$...
    > hey all,
    >
    > I've just spent the day creating a page that displays records from a
    > DB in a table. Each record has its own table and when u click the
    > "edit" button the fields become enabled and what I would like is that
    > when u click the "save" button the DB gets updated.
    >
    > Since tables dont have viewstate a co-worker of mine suggest that each
    > control in the table should be placed in an arrayList so they can
    > easily be accessed. I went ahead and did this and finised the page.
    >
    > the problem: Any changes u make to the page before hitting "save" dont
    > stay because I have to recreate the tables so all the old info is
    > loaded in. If I dont recreate the tables then all my arrayLists are
    > empty (why i dont know because the arrayLists have global scope)...
    >
    > does anyone know what I must do to fix it so my arrayLists dont get
    > emptied?
    >
    > Thanks in advance.
    >
    > *-----------------------*
    > Posted at:
    > www.GroupSrv.com
    > *-----------------------*
    ESPN Lover, Oct 14, 2004
    #2
    1. Advertising

  3. Thanks for the quick reply but after reading up on the data grid it
    looks like it would take a lot of extra work just to recreate the
    formatting I already have with the tables.

    Does anyone see a way I can keep what I have but work around the
    tables not having view state?

    Just throwing out an idea I havnt tried yet but what if I give each
    control in the table an ID...then the table might not exist on
    postback but I could at least find the control...maybe?

    Thanks.

    *-----------------------*
    Posted at:
    www.GroupSrv.com
    *-----------------------*
    ProgramAnalyst, Oct 15, 2004
    #3
    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. Al Wilkerson

    Updating dataset for SELECT queries

    Al Wilkerson, Sep 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    494
    Al Wilkerson
    Sep 18, 2004
  2. Mikhail Shilkin

    Resources updating

    Mikhail Shilkin, Oct 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    482
    Richard Grimes [MVP]
    Nov 1, 2004
  3. Stephen

    Error while Updating records

    Stephen, Nov 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    406
    Stephen
    Nov 22, 2004
  4. =?Utf-8?B?cm9jY28=?=

    updating Visual Studio.NET 2003

    =?Utf-8?B?cm9jY28=?=, Jun 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    716
    =?Utf-8?B?cm9jY28=?=
    Jun 26, 2005
  5. news.rcn.com
    Replies:
    2
    Views:
    1,113
    Roedy Green
    Dec 10, 2007
Loading...

Share This Page