Can I delete a user using FormView?

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I know there is a Membership.DeleteUser but how can I delete a user using
FormView?

I know I have to insert a DeleteCommand into the SqlDataSource but the
UserID is in the Membership and the Users tables (maybe others?) and I don't
know how to insert two DeleteCommand's into the SqlDataSource to delete a
row from each table.



Can I delete using FormView?



Thanks
 
You will have to circumvent the drag and drop functionality, of course.

Capture the delete on the formview and run Membership.DeleteUser. It is much
easier than writing custom code to clean up multiple tables. You are in
control here, as you write the code in the delete event handler.

--
Gregory A. Beamer
MVP; MCP: +I, Se, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

*************************************************
| Think outside the box! |
*************************************************
 
Sound much more error proof too.

Thanks

Cowboy (Gregory A. Beamer) said:
You will have to circumvent the drag and drop functionality, of course.

Capture the delete on the formview and run Membership.DeleteUser. It is
much easier than writing custom code to clean up multiple tables. You are
in control here, as you write the code in the delete event handler.

--
Gregory A. Beamer
MVP; MCP: +I, Se, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

*************************************************
| Think outside the box! |
*************************************************
 
Back
Top