Solved

C#.net - namespace in codebehind

Posted on 2011-09-07
5
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Import a excel sheet in a grid 2 45
What!!!??? 5 63
C#:  Need to switch between timer loop and token driven loop 2 32
Example code 13 45
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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