473,654 Members | 3,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Module in Project

I have a module in my asp.net application. How can I access the
Request.Serverv ariables collection from within this module?

Thanks,

Jason MacKenzie
Nov 18 '05 #1
2 1165
System.Web.Http Context.Current .Request

note that HttpContext.Cur rent might be null if this isn't a web application
so you might wanna check for that

HttpContext current = System.Web.Http Context.Current ;
if (current != null){
//you can access current.Request safely
}

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Jason MacKenzie" <jm************ **********@form et.com> wrote in message
news:Oe******** ******@TK2MSFTN GP09.phx.gbl...
I have a module in my asp.net application. How can I access the
Request.Serverv ariables collection from within this module?

Thanks,

Jason MacKenzie

Nov 18 '05 #2
Thank you sir.

"Karl" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in
message news:eV******** ******@TK2MSFTN GP15.phx.gbl...
System.Web.Http Context.Current .Request

note that HttpContext.Cur rent might be null if this isn't a web
application
so you might wanna check for that

HttpContext current = System.Web.Http Context.Current ;
if (current != null){
//you can access current.Request safely
}

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Jason MacKenzie" <jm************ **********@form et.com> wrote in message
news:Oe******** ******@TK2MSFTN GP09.phx.gbl...
I have a module in my asp.net application. How can I access the
Request.Serverv ariables collection from within this module?

Thanks,

Jason MacKenzie


Nov 18 '05 #3

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

Similar topics

0
2734
by: F. GEIGER | last post by:
py2exe and datetime -> No module named datetime I've begun to use the stdlib module datetime instead of my home brewn classes. Since then a py2exe app doesn't run anymore: Traceback (most recent call last): File "MainFrame.py", line 26, in ? File "Notebook.pyo", line 125, in ? File "NotebookPage_Activities.pyo", line 7, in ?
2
2585
by: | last post by:
Hi, This does sound like a bit of a weird thing to ask so I will state my question and then further down explain why I am trying to do it. So if you have the answer then reply! Or if you understand what I am trying to do and can suggest a better solution then reply also! Question --------
2
2748
by: Mythran | last post by:
I'm trying to add a module template to a project programmatically. I've tried many documented (w/o examples) ways of doing it to no avail. For example, I tried using Project.ProjectItems.AddFromTemplate("C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBWizards\Module\Templates\1033\Module.vb", "Common.vb") and this adds it ok. Problem is, it does not replace the stays as such). So I tried the DTE.LaunchWizard method and passed...
4
1607
by: Ron | last post by:
Hello, I have added a Namespace to my vb.net project. The namespace is the name of the project. Then I start the project from Sub Main Module1 Sub Main() Application.Run(New MyProj.Form1) End Sub
7
1073
by: Just Me | last post by:
I have a project that contains a usercontrol, some forms and a module. The only thing in the module is one variable that is there so that it can be used by the control and all the forms. Couldn't I put the variable in the usercontrol and somehow set it so that it can be used by usercontrol and all the forms? If so, how?
10
5484
by: Bonzol | last post by:
vb.net Hey there, could someone just tell me what the differnce is between classes and modules and when each one would be used compared to the other? Any help would be great Thanx in advance
6
4024
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new types of objects (classes) can only be defined in Class modules.
1
1740
by: Thammarat charoenchai. | last post by:
Are visual basic have something like Data Module in Delphi? that i can drop component to data module and can call to use that component any where in project Thanks you very much.
3
1224
by: RP | last post by:
I have a module written using VB 2005 which contains many ready to use functions. For some specific reasons, I cannot make it a DLL. Can I integrate this module in my C# project? If yes, how.
6
2264
by: dudeja.rajat | last post by:
Hi, I found on the net that there is something called module initialization. Unfortunately, there is not much information for this. However, small the information I found module initialization can be of use to me in my project. I'm currently messing with a problem where I'm keeping my global variables ( or symbols) in a module and the other mdoules in the project acess these global variables.
1
8494
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8596
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
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 we have to send another system
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.