I am getting 2 different error messages and I dont know where the problem is, I know it has something to do with the first 'product' & 'productModel.GetProduct (id);'.
My code is as follows:
Private void FillPage ()
{
if (String.IsNullOrWhiteSpace (Request.QueryString ["id"]))
{
int id = Convert.ToInt32 (Request.QueryString [id]);
ProductModel productModel = new ProductModel ();
Product product = ProductModel.GetProduct(id);
The last line of code contains the issue. The errors I am getting are:
Product error message
The type 'Product' in F:\Product.aspx' conflicts with the imported type 'Product' in 'App_Code.gmsjomg_, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in F:\Product.aspx'.
ProductModel.GetProduct(id) error
Cannot implicitly convert type 'Product [F:\App_Code\Model.cs (25)' to 'Product [F:\Product.aspx (12)]'
Any help would be greatly appreciated as I'm completely lost with these errors I cannot seem to get around them. Thanks
What I have tried:
i dont know where to start with tyring anything ive never had a problem like this before