In my programming, I encountered one such error,
But the product class I'm referencing does define a method that
protected void Bindpagedata (int categoryid)
{
Product Product = new product ();
DataTable dt = product. Getproductbyfenlei (CategoryID);
if (dt = NULL | | | dt. Rows.Count <= 0) return;
Set up by sales order
DataView dv = dt. DefaultView;
Dv. Sort = "Salenumber DESC";
Gvproduct.datasource = DV;
Gvproduct.databind ();
}
Method code in a class
public class product
{public
product ()
{
///
TODO: Add constructor logic here
//
}
dbhelp db = new Dbhelp ();
Public DataTable getproducts ()
{
String sql = ' pr_getproducts ';
return db.getdatatablebysql (SQL);
Public DataTable getproductbyfenlei (int categoryid)
{
String sql = "EXEC pr_getproductbyfenlei " + CategoryID + "";
return db.getdatatablebysql (SQL);
Search on the internet to solve the cs1061 error, did not solve the problem, in the observation, I in addition to the definition of a Product.cs class, but also defined a Web form with the same name as Product.aspx,
Is there a conflict in the compilation process because it is the same name? I have changed the name of the class below, Ctrl+f5 perfect operation. So everyone in the face of this error is whether to consider whether it is the same name of the problem. In addition, whether or not the right way to refuse, should try more.