473,322 Members | 1,719 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,322 software developers and data experts.

Access to the current Request object inside other classes

Hi-

I have a class that helps me save some data. In this class I need access to
Request.ApplicationPath

Do I need to inherit Page to get access to this? Is there some tricky
technique to get to the current Request object easier?

Weird question I know, but I don't really have my head around it all yet.
Thanks for any help,
Steve
Nov 18 '05 #1
2 2114
System.Web.HttpContext.Current.Request

"neverstill" <sk************@yahoo.com> wrote in message
news:ul*************@TK2MSFTNGP09.phx.gbl...
Hi-

I have a class that helps me save some data. In this class I need access to Request.ApplicationPath

Do I need to inherit Page to get access to this? Is there some tricky
technique to get to the current Request object easier?

Weird question I know, but I don't really have my head around it all yet.
Thanks for any help,
Steve

Nov 18 '05 #2
Perfect! Thank You.
I had resorted to passing in the HttpRequest to the constructor... what you
suggested is MUCH better.

Have a good one!

"Marina" <so*****@nospam.com> wrote in message
news:ui**************@TK2MSFTNGP10.phx.gbl...
System.Web.HttpContext.Current.Request

"neverstill" <sk************@yahoo.com> wrote in message
news:ul*************@TK2MSFTNGP09.phx.gbl...
Hi-

I have a class that helps me save some data. In this class I need access
to
Request.ApplicationPath

Do I need to inherit Page to get access to this? Is there some tricky
technique to get to the current Request object easier?

Weird question I know, but I don't really have my head around it all

yet. Thanks for any help,
Steve


Nov 18 '05 #3

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

Similar topics

4
by: clintonG | last post by:
I'm using the intrinsic Request object wrong and need some help with this one. I wrote a class file for some XMLTextWriter tasks and in the class file I want to use a conditional to determine if...
2
by: Phil Ten | last post by:
Hello, I am working on a .NET C++ project based on the "Class Library (.NET)" wizard of Visual Studio .NET 2003. I would like to know if my .NET component is running in a ASP.NET page (.apsx...
2
by: Terry Mulvany | last post by:
namespace CIBWeb { public class BasePage : System.Web.UI.Page { public BasePage() { } protected override void OnInit(EventArgs e) {
1
by: GarDavis | last post by:
When the ASP.Net application ends, the Application_OnEnd() method in Global.asax is called. This method calls a utility in a class library to dump information about the ending application. The...
8
by: Angel | last post by:
I am trying to access in Javascript within an ASP.NET web page the Request Object. I am specifically trying to access the values in the Request.QueryString. When I try to access the values I get an...
5
by: lds | last post by:
I am getting the following error: The "SendUsing" configuration value is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
4
by: Nalaka | last post by:
Hi, From the "Default.aspx.cs" I call a "someCode.cs"...... What I need to do is have access to the "Request object" in this second code. in the aspx.cs I can access using Request.... Can I...
0
by: Brian Cryer | last post by:
I posted this a few days back to microsoft.public.dotnet.framework.aspnet but didn't get any answers, so I'm hoping someone here might be able to point me in the right direction: I'm developing...
45
by: =?Utf-8?B?QmV0aA==?= | last post by:
Hello. I'm trying to find another way to share an instance of an object with other classes. I started by passing the instance to the other class's constructor, like this: Friend Class...
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...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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.