By using HttpMethod property of HttpRequestBase class, you can find out whether an action is invoked by HTTP GET or POST.
public ActionResult Index(int? id) { if (Request.HttpMethod == "GET") { //TODO: } else if (Request.HttpMethod == "POST") { //TODO: } else { //TODO: } return View(); }