views:

7

answers:

1

Hi,

I've been messing about with HttpApplication app = (HttpApplication)source;

Is there some way of the server identifying if the request is get or post.

Basically i want to create an if statement and if the request is a GET it jumps into the if statement, if its a post it doesnt.

Anyone?

+1  A: 

You can check the Request.HttpMethod property.

HttpApplication app = (HttpApplication)source;
if(app.Context.Request.HttpMethod == "GET")
{
  // Do stuff.
}
Brandon