Solved

Import namespace problem

Posted on 2004-04-20
3
530 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 150 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now