Sunday, 28 January 2018

How to identify Request is of Post /Get with in Controller action

if (HttpContext.Current.Request.HttpMethod == "POST")
{
    // The action is a POST.
}

if (HttpContext.Current.Request.HttpMethod == "GET")
{
    // The action is a GET.}

No comments:

Post a Comment