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 468127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:39:04+00:00 2026-05-12T23:39:04+00:00

This is the common structure of all of my classes: public class User {

  • 0

This is the common structure of all of my classes:

public class User
{
    public int ID { get;set; }
    public string User_name { get; set; }
    public string Pass_word { get; set; }
    public string UserTypeCode { get; set; }

    public int SaveOrUpdate()
    {
        int id = -1;

        if (this._ID <=0)
        {
            id = this.Save();
        }
        else
        {
            bool success = this.Update();

            if(success)
            {
                id = this._ID;
            }
            else
            {
                throw new Exception("Update failed!");
            }
        }

        return id;
    }

    private int Save() { }
    private bool Update() { }
    public static User Get(int id) { }
    public static List<User> Get() { }
    public bool Delete() { }
}

I was using these classes smoothly with winforms.

But while working with ASP.NET, when I try to configure the object data source for a GridView, I don’t find the method-names in the Data Source Configuration Wizard. I.e. they are not showing up. So my methods became useless.

I can’t change this general structure of all of my classes. I have also a code generator written for them. And I must use ObjectDataSources.

My first question is, why don’t they show up?

And, what should I do to make them show up?

  • 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-05-12T23:39:04+00:00Added an answer on May 12, 2026 at 11:39 pm

    ObjectDataSources look for methods within the type specified that match the signature of the update/insert method name and the update/insert parameters provided.

    Your SaveOrUpdate method is on an instantiated class, and the ObjectDataSource will not find a matching method signature.

    From what you have, if you must use ObjectDataSources, you may want to consider using a wrapper method. Example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of classes which are all derived from a common base
I've searched all over and couldn't find an answer to this seemingly common question,
I have a small hierarchy of classes that all implement a common interface. Each
Problem Description I have an abstract Paper class that contains common properties of all
I have built an ear with this structure (not all files shown here): myapp.ear/
I have a hierarchical class structure like this: Category -> Template -> Instance A
I have this C# class structure that I would like to refactor to use
I have two data structure classes (this is a simplified version of my code)
As we all know, the common structure of rubygem assumes presence of lib directory.
Suppose I have these two objects: public class Object1 { string prop1; string prop2;

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.