Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > User Control Problem

Thread Tools

User Control Problem

Posts: n/a
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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
User Control to Control Other User Control Jonathan Wood ASP .Net 4 02-02-2010 03:41 PM
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
Databinding in a user control that contains another user control ASP .Net 0 01-07-2005 04:55 PM
Event not firing for user control inside user control vatech1993 ASP .Net 4 12-11-2004 02:51 PM
Manipulating a User Control from another User Control Tom Rowton ASP .Net 2 08-01-2003 08:18 PM