waaromikniet
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=(loc al)\\NetSD K;database =grocertog o;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?
**************************
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=(loc
SqlDataAdapter sqlAdapter1 = new SqlDataAdapter("Select * from Products where categoryid=" + categoryID, sqlConnection);
DataSet products = new DataSet();
sqlAdapter1.Fill(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?
hav you add a reference to this namespace ?
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.