Formview delete doesn't work bound to a class

Discussion in 'ASP .Net Web Controls' started by Joe, Nov 14, 2007.

  1. Joe

    Joe Guest

    I created a data access class with get, insert, update and delete
    methods. I have an object datasource bound to the class and a
    formview bound to the datasource. The get, insert, and updates work
    fine, but I can't get the delete to work. It does not pass any values
    to the method for some reason. Doe anyone have any ideas what I might
    be missing?
     
    Joe, Nov 14, 2007
    #1
    1. Advertisements

  2. Joe

    Phil H Guest

    On 14 Nov, 21:33, Joe <> wrote:
    > I created a data access class with get, insert, update and delete
    > methods. I have an object datasource bound to the class and a
    > formview bound to the datasource. The get, insert, and updates work
    > fine, but I can't get the delete to work. It does not pass any values
    > to the method for some reason. Doe anyone have any ideas what I might
    > be missing?


    Have you set the DataKeyNames property?
     
    Phil H, Nov 17, 2007
    #2
    1. Advertisements

  3. Joe

    Joe Guest

    On Nov 17, 9:14 am, Phil H <> wrote:

    > Have you set the DataKeyNames property?


    I tried that and then I get the message that it can't find a delete
    method with whatever parameters.
     
    Joe, Nov 19, 2007
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9obiBCYWlsZXk=?=

    FormView and ObjectDataSource - Delete doesn't work

    =?Utf-8?B?Sm9obiBCYWlsZXk=?=, Jun 3, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    4,600
    =?Utf-8?B?Sm9obiBCYWlsZXk=?=
    Jun 3, 2005
  2. Stuart Ferguson
    Replies:
    1
    Views:
    5,132
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Apr 3, 2006
  3. LeAnne
    Replies:
    0
    Views:
    1,255
    LeAnne
    May 14, 2006
  4. Replies:
    3
    Views:
    9,406
  5. Replies:
    2
    Views:
    1,116
  6. David
    Replies:
    2
    Views:
    728
    Allen Chen [MSFT]
    Jun 8, 2009
  7. Oliver Hopton

    Collection class bound to DataGrid doesn't use my custom enumerator!

    Oliver Hopton, Oct 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    237
    Alan Green
    Oct 29, 2003
  8. Fred Zolar
    Replies:
    0
    Views:
    321
    Fred Zolar
    Apr 1, 2004
Loading...