User Control Problem

Discussion in 'ASP .Net' started by Chris, Jun 3, 2007.

  1. Chris

    Chris Guest

    I have a formview within a user control bound to an objectdatasource. When
    my formview is in edit mode and I press update I get an error saying that
    the form must be in edit mode to do an update. I am guessing on the postback
    the user control is setting the form back to ReadOnly. I got around this by
    triggering the update in the formview from a button using the updateitem
    method but changing the mode of the form to edit beforehand.

    This works but the error that I bubble up in the event of a validation error
    from my business object won't display on the page. I trap the error in the
    formview item updated event and display it in a label. This label won't
    display, I suspect because I am altering the formview back to edit.

    What Am I doing wrong? I think there is something fundemental I am not
    understanding about formviews within user controls. Regards, Chris.
    Chris, Jun 3, 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. Tom Rowton
    Replies:
    2
    Views:
    656
    Tom Rowton
    Aug 1, 2003
  2. vatech1993
    Replies:
    4
    Views:
    5,684
    =?Utf-8?B?U8Opcmdpbw==?=
    Dec 11, 2004
  3. Replies:
    0
    Views:
    433
  4. Mad Scientist Jr
    Replies:
    0
    Views:
    633
    Mad Scientist Jr
    Mar 22, 2006
  5. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    539
    Jonathan Wood
    Feb 2, 2010
Loading...

Share This Page