Solved

C#.net - namespace in codebehind

Posted on 2011-09-07
5
264 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
Comment Utility
If you are referring to the .cs file its just using System.Data.SqlClient;
0
 
LVL 10

Author Comment

by:GlobaLevel
Comment Utility
apologies....I said codebehind when I meant inline code....
0
 
LVL 9

Accepted Solution

by:
Grant Spiteri earned 500 total points
Comment Utility
0
 
LVL 15

Expert Comment

by:navneethegde
Comment Utility
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
Comment Utility
Hi!

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

Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How can I use this extension method? 8 35
C# SQL BULK INSERT CLASS 5 34
String manipulation 15 49
c# if statement weird reaction 3 29
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

9 Experts available now in Live!

Get 1:1 Help Now