Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Import namespace problem

Posted on 2004-04-20
3
Medium Priority
?
553 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:waaromikniet
  • 2
3 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 10867893
hav you add a reference to this namespace ?
0
 
LVL 4

Author Comment

by:waaromikniet
ID: 10868115
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
0
 
LVL 28

Accepted Solution

by:
mmarinov earned 450 total points
ID: 10868429
you have to rebuild the application so you will need market.dll ( which will be imported )
if you use vs - go to your project and add a reference by selecting Market

B..M
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question