473,326 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

using directive w/o code-behind

I developed an asp.net 2.0 page without using the code-behind model because
the page is so simple. Now I am trying to add "using
System.Data.OracleClient" to the page, but asp doesn't seem to like it no
matter where I put it. Is there a valid syntax for this? I feel silly
recoding the page to use code-behind just so I can add the using directive.

Thanks.
Jun 12 '06 #1
4 1576
Use the Page directive :

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

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Steve Trandahl" <St***********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I developed an asp.net 2.0 page without using the code-behind model because
the page is so simple. Now I am trying to add "using
System.Data.OracleClient" to the page, but asp doesn't seem to like it no
matter where I put it. Is there a valid syntax for this? I feel silly
recoding the page to use code-behind just so I can add the using directive.

Thanks.

Jun 12 '06 #2
after the line
<%@ Page Language= ...

add the line:

<%@ Import Namespace="System.Data.OracleClient" %>
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)

"Steve Trandahl" <St***********@discussions.microsoft.com> escreveu na
mensagem news:F2**********************************@microsof t.com...
I developed an asp.net 2.0 page without using the code-behind model because
the page is so simple. Now I am trying to add "using
System.Data.OracleClient" to the page, but asp doesn't seem to like it no
matter where I put it. Is there a valid syntax for this? I feel silly
recoding the page to use code-behind just so I can add the using
directive.

Thanks.

Jun 12 '06 #3
<%@ Import Namespace="System.Data.OracleClient" %>

"Steve Trandahl" <St***********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I developed an asp.net 2.0 page without using the code-behind model because
the page is so simple. Now I am trying to add "using
System.Data.OracleClient" to the page, but asp doesn't seem to like it no
matter where I put it. Is there a valid syntax for this? I feel silly
recoding the page to use code-behind just so I can add the using
directive.

Thanks.

Jun 12 '06 #4
Thanks! That worked like a charm.

"Juan T. Llibre" wrote:
Use the Page directive :

<%@ Import Namespace="System.Data.OracleClient" %>
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Steve Trandahl" <St***********@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
I developed an asp.net 2.0 page without using the code-behind model because
the page is so simple. Now I am trying to add "using
System.Data.OracleClient" to the page, but asp doesn't seem to like it no
matter where I put it. Is there a valid syntax for this? I feel silly
recoding the page to use code-behind just so I can add the using directive.

Thanks.


Jun 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: trying_to_learn | last post by:
im in the primary stages of learning C++. The book im learning from says Dont use using namespace.. directive in header file However im trying to make the following header file.I need to include...
12
by: Calum Grant | last post by:
In older C++ computer books, you'll often see using namespace std; even in my 1996 copy of Stroustrup. Nowadays, it seems to be considered better to qualify names to make it clearer what...
3
by: Imre | last post by:
As far as I know, the using directive is transitive, and I'm not sure I like this. So I'd like to ask if there's any workaround. Consider this: namespace MyNameSpace { void...
3
by: neverstill | last post by:
Hello- I am a little confused about something. I have create a .cs file that looks like this: using System; namespace MyApp.Types { using INT = System.Int32; }
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
13
by: rincewind | last post by:
I remember reading an article (was it Herb Sutter's?) that recommended avoiding using directives. While I quite understand this recommendation for headers, what's wrong in using directive in .cpp...
0
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi there! Problem: I am refactoring all my database code because I noticed every few days sqlservr.exe would show as Mem Usage of 500,000k in the task manager and crash our server. Solution:...
4
by: Jimmy | last post by:
Hi, The other day, my boss corrected me to use "explicit qualification" instead of using "using directive". she asked me to use : "System.Data.DataSet ds = new System.Data.DataSet();" ...
2
by: m.a | last post by:
Hello, I have the following code which is an entity for a table in my database. but I am getting several errors such as: The type or namespace name 'ColumnAttribute' could not be found (are...
3
by: =?Utf-8?B?QUEyZTcyRQ==?= | last post by:
With using System.Configuration why is ConfigurationManager.AppSettings generate an error? Why does the error resolve itself when, in addition to the using directive, I add a reference...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.