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;
}