Solved

C#.net - namespace in codebehind

Posted on 2011-09-07
5
265 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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 …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

861 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

24 Experts available now in Live!

Get 1:1 Help Now