C#.net - namespace in codebehind

In vb.net:

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

what is the equal version in C#.NET?

<%@ Using Namespace="System.Data.SqlClient"%>
?????
LVL 10
GlobaLevelAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Grant SpiteriConnect With a Mentor Senior consultantCommented:
0
 
Grant SpiteriSenior consultantCommented:
If you are referring to the .cs file its just using System.Data.SqlClient;
0
 
GlobaLevelAuthor Commented:
apologies....I said codebehind when I meant inline code....
0
 
NavneetCommented:
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
 
NavneetCommented:
Hi!

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

Thanks!
0
All Courses

From novice to tech pro — start learning today.