Ask a Question related to ASP.NET Security, Design and Development.
-
Riham via .NET 247 #1
using HttpContext Class
I'm trying to get the PathInfo propert for the current URL request in a class file, but I can't get it to work.
Here's what I've tried so far:
using System.Web;
String PathInfo;
PathInfo = HttpContext.Current.Request.PathInfo();
I've also tried "using System.Web.HttpContext;"
It gives me the following error:
"The type or namespace name 'HttpContext' could not be found (are you missing a using directive or an assembly reference?)"
Would you please help me know where the problem is?
Thanks,
Riham
-----------------------
Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
<Id>j+6juX7DXEijP0Hp/Pl5pg==</Id>
Riham via .NET 247 Guest
-
httpcontext HELP
The issue is that I want to maintain the login without asking the user to login back to the application in case the session times out.....and how do... -
HttpContext
Hello, i searched 2days for a solution and maybe someone can help me. I'm programmin' a C# Assemblie and don't know which class I should use... -
HttpContext items and one-way methods
Hi, I try to put some custom objects into HttpContext.Current.Items collection in one-way webmethod, but they seem not to be there in another... -
HttpContext.Current
Now how in the wolrd does that work? How does it know that some static method I called on some library was called by a page that had that context?... -
Questions on HttpContext
Hello ALL! It is known that there's a HttpContext class in dotnet framework which provides variable sharing. I have two questions that i can... -
Re: using HttpContext Class
That is because HttpContext is the Class name.
If you are in web page then the HttpContext for the current page will be
called Context
eg Context or this.Context. or if you are in a UserControl/Web Control
this.Page.Context
If you are attempting to use the Context from another class you have to make
sure that the class has a reference either to the Context or the Parent Page
Hope this helps - posting is provided as is
"Riham via .NET 247" <anonymous@dotnet247.com> wrote in message
news:OnzCJ4TJEHA.3264@tk2msftngp13.phx.gbl...> I'm trying to get the PathInfo propert for the current URL request in a
> class file, but I can't get it to work.
> Here's what I've tried so far:
>
> using System.Web;
>
> String PathInfo;
> PathInfo = HttpContext.Current.Request.PathInfo();
>
> I've also tried "using System.Web.HttpContext;"
>
> It gives me the following error:
> "The type or namespace name 'HttpContext' could not be found (are you
> missing a using directive or an assembly reference?)"
>
> Would you please help me know where the problem is?
>
> Thanks,
> Riham
>
> -----------------------
> Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
>
> <Id>j+6juX7DXEijP0Hp/Pl5pg==</Id>
Guest



Reply With Quote

