You can use the HttpContext class' static property Current. As long as the
class you're writing is called from an asp.net application,
HttpContext.Current contains a reference to the current HTTP request.
For example:
using System.Web;
public class SomeClass
{
public void SomeMethod()
{
int postedFormElements = HttpContext.Current.Request.Form.Count;
}
}
HTH,
Lars-Erik
"Vik" <viktorum@==yahoo.com==> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
How can I access the Session and Application objects in some class method?
Currently I pass a page as a parameter to this method just to get these
objects. Is there a better way?
Thanks.