Detailsview and Displaying Errors

J

JJ

I have a detailsview that is used to update/insert records in my sql
database via a stored procedure.

The stored procedure returns a negative int when there is a problem - for
example a duplicate entry exists.

I can check for the return value in the objectdatasources 'OnInserted', and
I can display an error via a label control.

However, I'd like the detailsview fields to keep the erroneous entries so
the user can change them.
How can I achieve this?
Do I use viewstate?

Any pointers appreciated.
JJ
 
J

JJ

In the end I used a custom validator to check for a duplicated entry before
inserting the record.
This means two trips to the database, but unless someone can suggest another
method, that will have to do.

JJ
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top