Module in Project

  • Thread starter Thread starter Jason MacKenzie
  • Start date Start date
J

Jason MacKenzie

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

Thanks,

Jason MacKenzie
 
System.Web.HttpContext.Current.Request

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

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

Karl
 
Thank you sir.

Karl said:
System.Web.HttpContext.Current.Request

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

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

Karl
 
Back
Top