GlobaLevel
asked on
C#.net - namespace in codebehind
In vb.net:
<%@ Import Namespace="System.Data.Sql Client"%>
what is the equal version in C#.NET?
<%@ Using Namespace="System.Data.Sql Client"%>
?????
<%@ Import Namespace="System.Data.Sql
what is the equal version in C#.NET?
<%@ Using Namespace="System.Data.Sql
?????
If you are referring to the .cs file its just using System.Data.SqlClient;
ASKER
apologies....I said codebehind when I meant inline code....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
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!
Hi!
They remain same for VB and C#
<%@ Import Namespace="System.Data.Sql Client"%>
Thanks!
They remain same for VB and C#
<%@ Import Namespace="System.Data.Sql
Thanks!