I know, I know, I know. I shouldn\'t be doing webforms inside of MVC, I completely agree. But, the people who sign my paycheck will not approve a complete conversion of ou
I often use this Method (declared on my BaseController class)
protected bool IsPostBack()
{
bool isPost = string.Compare(Request.HttpMethod, "POST",
StringComparison.CurrentCultureIgnoreCase) == 0;
if (Request.UrlReferrer == null) return false;
bool isSameUrl = string.Compare(Request.Url.AbsolutePath,
Request.UrlReferrer.AbsolutePath,
StringComparison.CurrentCultureIgnoreCase) == 0;
return isPost && isSameUrl;
}