How to keep values in fields after ChangeMode to Insert from Edit?

Discussion in 'ASP .Net' started by R Bandeira, Sep 6, 2007.

  1. R Bandeira

    R Bandeira Guest

    How to keep values in fields after ChangeMode to Insert from Edit? I
    am implementing a re-insert type feature, after an edit.

    // Change form to insert mode
    FormView1.ChangeMode(FormViewMode.Insert);

    // Repopulate the form
    Label.Text = "12345";
    TextBox.Text = "22";

    // User then gets to edit form and insert data as a new
    record. But controls are losing data (fetched from previous edit
    mode).

    I cannot set default values to controls after changing mode. The
    controls are rendering blank. What is the work around please? Thanks
    in advance.
     
    R Bandeira, Sep 6, 2007
    #1
    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. J055
    Replies:
    1
    Views:
    12,143
    Walter Wang [MSFT]
    Aug 10, 2006
  2. Trev

    Formview ChangeMode Problem

    Trev, Feb 8, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    628
  3. J055
    Replies:
    5
    Views:
    770
    Walter Wang [MSFT]
    Aug 20, 2007
  4. rodchar

    formview changeMode

    rodchar, Dec 13, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    541
    rodchar
    Dec 17, 2007
  5. David Thielen

    FormView.ChangeMode(FormViewMode.Edit) not working

    David Thielen, Mar 2, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    709
    David Thielen
    Mar 4, 2007
Loading...

Share This Page