PC Review


Reply
Thread Tools Rate Thread

Detailsview loses insert mode contents when Insert fails...

 
 
cannontrodder
Guest
Posts: n/a
 
      23rd Jul 2006
I am using a custom business object to deal with inserting, editing,
deleting and adding new users to my site which uses the membership
class.

When I add a new user, it can fail due to the user already existing in
the membership data store. This is fine, I catch the exception in my
business object and gracefully deal with it.

What is frustrating is that the detailsview does not remember the
values it contained before the insert failed. This means that the user
must re-enter all the data rather than just edit the offending item.

How can I get it to maintain state in these instances?

A method I have thought may work is instead of going into insert mode,
going into edit mode and binding it to an object with no data in. But
how do I change the text of the edit mode 'save' button to the word
'insert'?

 
Reply With Quote
 
 
 
 
cannontrodder
Guest
Posts: n/a
 
      25th Jul 2006
I'll reply to my own post so this is in the archive.

If you use a custom validator on the username, you can ensure the user
does not exist before adding.

Hope this helps someone!

cannontrodder wrote:
> I am using a custom business object to deal with inserting, editing,
> deleting and adding new users to my site which uses the membership
> class.
>
> When I add a new user, it can fail due to the user already existing in
> the membership data store. This is fine, I catch the exception in my
> business object and gracefully deal with it.
>
> What is frustrating is that the detailsview does not remember the
> values it contained before the insert failed. This means that the user
> must re-enter all the data rather than just edit the offending item.
>
> How can I get it to maintain state in these instances?
>
> A method I have thought may work is instead of going into insert mode,
> going into edit mode and binding it to an object with no data in. But
> how do I change the text of the edit mode 'save' button to the word
> 'insert'?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Setting DetailsView into Insert Mode with default values Nirmal Singh Microsoft ASP .NET 1 13th Oct 2010 07:22 PM
Using the Insert key to switch between insert & overwrite mode invarious Word reversions SlickRCBD Microsoft Word New Users 13 9th Jan 2010 02:06 AM
DetailsView programmatically enter Insert Mode Don Microsoft ASP .NET 3 24th Mar 2008 09:42 AM
using DetailsView control, update works, insert fails oaksong@hotmail.com Microsoft ADO .NET 2 5th Oct 2006 10:02 PM
Detailsview INSERT fails on Windows XP machines nsitnikov@gmail.com Microsoft ASP .NET 0 28th Jun 2006 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:38 AM.