Solved

C#.net - namespace in codebehind

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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