HttpContext Response vs. HttpApplication Response

D

Doogie

What is the difference between this:

HttpContext.Current.Response

and this:

System.Web.HttpApplication.Response

I want to create a common method in a .vb file and cannot use
System.Web.HttpApplication.Response to do it. But I can use
HttpContext.Current.Response and wanted to know what the difference is
(if any) just to make sure I am not creating a problem for myself by
doing it that way.
 
G

Guest

HttpContext.Current.Response provides you with a reference to the CURRENT
Response object for the actual page that is being processed.
Peter
 
D

Doogie

So it sounds like it is not a good idea to use .vb files when dealing
with the Response object? I would like to have a method that creates
a cookie (there's several lines of code to get the data for this
cookie) and I need to have this method accessible by one of my pages
as well as the global.aspx.vb file (cause I want to create the cookie
upon startup, but also have the ability to recreate it if needed
within another page). I'm not going to have a way to use a Response
object that both have access to within this .vb file am I?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top