User Control Problem

C

Chris

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top