Link to home
Start Free TrialLog in
Avatar of waaromikniet
waaromiknietFlag for Netherlands

asked on

Import namespace problem

I've got the following market.cs file(short version)

******************************************
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;

namespace Market
{
   public class InventoryDB
   {
      public DataTable GetProducts(int categoryID) {

          SqlConnection sqlConnection = new SqlConnection("server=(local)\\NetSDK;database=grocertogo;Trusted_Connection=yes");
          SqlDataAdapter sqlAdapter1 = new SqlDataAdapter("Select * from Products where categoryid=" + categoryID, sqlConnection);

          DataSet products = new DataSet();
          sqlAdapter1.Fill(products, "products");

          return products.Tables[0];
      }
  }
}

*************************************

In my aspx file I import the follwing

**************************************
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Market" %>


<html>
<head>
****************************************

I am, getiing an error on the import namespace market. Does anybody know why this happens?
Avatar of mmarinov
mmarinov

hav you add a reference to this namespace ?
Avatar of waaromikniet

ASKER

How do you mean?

I downloaded a sample from the quicktutorials website. I thought they would work. i am just beginning in .Net can you define what you mean with reference
ASKER CERTIFIED SOLUTION
Avatar of mmarinov
mmarinov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial