ObjectDataSource 'AddressesList' could not find a non-generic method 'DAL.AddressDBAccess.GetAddressList' that has no parameters.

this is the error I get
after googling lots of perople seem to have this type of error when they are inserting and updating but all im trying to to is bind the object.

What am i doing wrong??
im very new to this so maybe ive missed somethinbg really obvious

here is my mark up

 <asp:ObjectDataSource 
                ID="AddressesList" 
                runat="server"
                TypeName = "DAL.Address"
                SelectMethod =  "DAL.AddressDBAccess.GetAddressList" />


                <asp:GridView ID="grid" DataSourceID = "AddressesList" runat="server" 
                    allowsorting ="true" /> 

and here is my method with no parameters

`public List<Address> GetAddressList()
        {
            List<Address> listAddress = null;

            using (DataTable table = SqlDBHelper.ExecuteSelectCommand("sp_BL_AddressList",CommandType.StoredProcedure))
            {

                if (table.Rows.Count > 0)
                {
                    listAddress = new List<Address>();

                    foreach (DataRow row in table.Rows)
                    {
                        Address address = new Address();
                        address.ID = Convert.ToInt32(row["ID"]);
                        etc etc etc  Convert.ToInt32(row["Coadd"]);

                        listAddress.Add(address);
                    };


                }
            }

            return listAddress;
        }
Member Avatar
LastMitch

after googling lots of perople seem to have this type of error when they are inserting and updating but all im trying to to is bind the object.

Read this and used it's solution:

http://forums.asp.net/t/969187.aspx

That will remove the error: DataSet Error "Could not find a non generic method"

im very new to this so maybe ive missed somethinbg really obvious

There are some tutorial about it making it work correctly:

http://msdn.microsoft.com/en-us/library/aa581784.aspx

http://highoncoding.com/Articles/139_GridView_With_ObjectDataSource.aspx

http://www.codegod.com/Binding-an-ASP-NET-GridView-to-ObjectDataSource-AID478.aspx