Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Accessing Response/Request objects from class Libraries

Accessing Response/Request objects from class Libraries

Scheduled Pinned Locked Moved ASP.NET
csharpbusinesstutorialquestion
4 Posts 3 Posters 12 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gerry
    wrote on last edited by
    #1

    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.

    P Richard DeemingR G 3 Replies Last reply
    0
    • G Gerry

      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.

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      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 Africa

      Colin Davies wrote: ...can you imagine a John Simmons stalker !

      1 Reply Last reply
      0
      • G Gerry

        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.

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        Use the static property Current of the HttpContext class:

        HttpRequest Request = HttpContext.Current.Request;

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        • G Gerry

          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.

          G Offline
          G Offline
          Gerry
          wrote on last edited by
          #4

          None of these ideas work. any others? Gerry.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups