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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with VS.NET for the first time

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
How do you declare name spaces when using code-behind

When I used my code inline I did this

<%@ import Namespace=&quot;System.Data.sqlClient&quot; %>
<%@ import Namespace=&quot;System.Data&quot; %>

but now in the code behind it tells me things are not declared. How do I fix this?
 
You can set import statements at the beginning of your code behind before your class declaration

Imports System.XML

Its also a good idea to add references to the various namespaces/assemblies that you want to use in your References folder within your project (just right-click the folder in vs.net, select Add , and go from there).

D
 
Is there a way to tell VS.NET not to format code?? or add code to my aspx pages?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top