Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:04:46+00:00 2026-06-05T00:04:46+00:00

I have a list view with 5 columns which is populated via a stored

  • 0

I have a list view with 5 columns which is populated via a stored procedure. That is displaying fine.
I also have a Delete method which only takes in one int (the ID) but I am not sure how to define this method in the dataSource of the listview.

I keep getting an error that there is no Delete method which takes in 5 paramteres (the listview’s column names) which of course there isn’t. There is one which takes in 1 int parameter, see below.

I think there must be some error with the DataSource Delete method declaration, can anyone tell?

<asp:ObjectDataSource ID="userListDataSource" runat="server" 
            SelectMethod="GetUserList" TypeName="UserManagerBO" 
            DeleteMethod="DeleteUser">
            <DeleteParameters>
                <asp:Parameter Name="userID" Type="Int32"/>
            </DeleteParameters>
        <SelectParameters>
            <asp:ControlParameter DefaultValue="61" Name="userID" Type="Int32" 
                ControlID="lbUsers" PropertyName="SelectedValue" />
        </SelectParameters>
</asp:ObjectDataSource>

The method to delete is DeleteUser(int userID) and it seems to always look at the SelectParameters, even for my Delete method.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:04:47+00:00Added an answer on June 5, 2026 at 12:04 am

    Try dont provide parameter to the deletemethod, by doing this you can get the entire object selected for delete as a parameter. In Delete method,

    Public Void DeleteUser(User usr)
    {
            //delete user of usr.UserID
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view which has a grid view with four columns. The
I have a list view with 10 columns and I want each row to
i have to show 3 columns in List view. I tried having table inside
I have a listview which is populated by a SimpleCursorAdapter that is binding data
I have to query a view and include only those columns which are defined
I have a view which contains (among other columns) a header name, and an
I have a data view web part on a page which is displaying a
I have a list view comprised of the following: // Add column headers for
I have ListView that uses a GridView to display several columns of data. Two
I have a listview in c# with three columns and the view is details.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.