Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do namespace references in CodeBehindModule

Status
Not open for further replies.

johnfrederick

Programmer
Sep 30, 2002
34
0
0
US
I have a MobilePage app running with all the script in the aspx module and want to move it to the CodeBehindModule. I can't get the namespace references right. If I do:

using System;
using System.Data;
using System.Data.OleDb;
using System.Web;
Public Class DeliveryList6
Inherits System.Web.UI.MobileControls.MobilePage
etc.

The usings are all flagged in the IDE display and when rebuilt, they all generate error messages: "Declaration Expected". I took the "using system" one right out of a book. Can anyone advise?
 
The "using" keyword in C# doesn't set a reference. It allows your code to use shorter names for datatypes. Instead of "System.Xml.XmlDocument" it allows you to use "XmlDocument" instead, which saves you a lot of typing.

To set a reference, you need to expand the "References" part of your project (in project explorer), right click, and select "Add". You can then select one of the Microsoft-supplied assemblies, or browse out to one of your own assemblies.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top