473,462 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Global.ASAX using Statements?

I tried to put "using System.IO;" in my global.asax and Visual Studio
2005 would not let me compile. Why?

Thanks.

Feb 9 '06 #1
3 7762
"using" is code-behind syntax.

global.asax doesn't use code-behind any more.

Try using
<%@ Import Namespace="System.IO" %>


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/
===================================
"xenophon" <xe******@online.nospam> wrote in message
news:4f********************************@4ax.com...
I tried to put "using System.IO;" in my global.asax and Visual Studio
2005 would not let me compile. Why?

Thanks.

Feb 9 '06 #2

Juan T. Llibre wrote:
"using" is code-behind syntax.

global.asax doesn't use code-behind any more.

Try using
<%@ Import Namespace="System.IO" %>


Thank goodness that they sill give you intellisense after you import
your namespace for the Global.asax



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/
===================================
"xenophon" <xe******@online.nospam> wrote in message
news:4f********************************@4ax.com...
I tried to put "using System.IO;" in my global.asax and Visual Studio
2005 would not let me compile. Why?

Thanks.


Feb 10 '06 #3
re:
Thank goodness that they sill give you intellisense
after you import your namespace for the Global.asax
Pretty cool, huh ?

;-)

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/
===================================
"tdavisjr" <td******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...

Juan T. Llibre wrote: "using" is code-behind syntax.

global.asax doesn't use code-behind any more.

Try using
<%@ Import Namespace="System.IO" %>


Thank goodness that they sill give you intellisense after you import
your namespace for the Global.asax

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/
===================================
"xenophon" <xe******@online.nospam> wrote in message
news:4f********************************@4ax.com...
I tried to put "using System.IO;" in my global.asax and Visual Studio
2005 would not let me compile. Why?

Thanks.

Feb 10 '06 #4

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

Similar topics

3
by: hansiman | last post by:
I use Application_Start in global.asax to set some physical folder paths ie.: Application("pdf") = "c:\www\<site>\pdf\" global.asax uses code behind. When I move the project from the dev to...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
2
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
2
by: C | last post by:
Hi, I want to add a an object to a Session in my global.asax.cs but am unable. I try to do below in my Application_AuthenticateRequest Session.Add("Employee", employee); and I get an...
6
by: Mark Rae | last post by:
Hi, When you create a new web site in VS.NET 2005, it doesn't contain a Global.asax file by default and, when you add one manually, it creates a Global.asax file with in-line code e.g. <%@...
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
4
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
3
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've created an <appSettingsvariable called "AppStartTime". Within the Global.asax file in the Application_Start procedure I want to set the "AppStartTime" to the current time. How can I access...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.