Solved

C#.net - namespace in codebehind

Posted on 2011-09-07
5
266 Views
Last Modified: 2012-06-27
In vb.net:

<%@ Import Namespace="System.Data.SqlClient"%>

what is the equal version in C#.NET?

<%@ Using Namespace="System.Data.SqlClient"%>
?????
0
Comment
Question by:GlobaLevel
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:Grant Spiteri
ID: 36499785
If you are referring to the .cs file its just using System.Data.SqlClient;
0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 36499820
apologies....I said codebehind when I meant inline code....
0
 
LVL 9

Accepted Solution

by:
Grant Spiteri earned 500 total points
ID: 36499878
0
 
LVL 15

Expert Comment

by:navneethegde
ID: 36500792
Hi!

What you have is <%@ Import Namespace are page directive which  makes tells compiler how to process the page
above one tells the compiler to get the Namespaces required, similarly there are Language directive which tells how the lanuage in which it needs to be processed,
Hence these are independent of language
Check these
http://www.aspdotnetcodes.com/Asp.Net_Page_Directives.aspx

Thanks!
0
 
LVL 15

Expert Comment

by:navneethegde
ID: 36500794
Hi!

They remain same for VB and C#
<%@ Import Namespace="System.Data.SqlClient"%>

Thanks!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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