Accessing Response/Request objects from class Libraries
-
Is it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? I looking to read/write cookies back to the client in a class library, not sure how to pass these into or access from my business object. HttpApplication/HttpContext? Thanks.
-
Is it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? I looking to read/write cookies back to the client in a class library, not sure how to pass these into or access from my business object. HttpApplication/HttpContext? Thanks.
Gerry wrote: Is it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? If the C# class is inhereted from Control or Page then you can use this code:
this.Page.Response
/Request
Paul Watson
Bluegrass
Cape Town, South AfricaColin Davies wrote: ...can you imagine a John Simmons stalker !
-
Is it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? I looking to read/write cookies back to the client in a class library, not sure how to pass these into or access from my business object. HttpApplication/HttpContext? Thanks.
Use the static property
Current
of theHttpContext
class:HttpRequest Request = HttpContext.Current.Request;
-
Is it possible to access the intrinsics objects like in old VB, request/response/application in my c# class library? I looking to read/write cookies back to the client in a class library, not sure how to pass these into or access from my business object. HttpApplication/HttpContext? Thanks.