Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IsAjaxRequest Method
Collapse the table of content
Expand the table of content

AjaxRequestExtensions.IsAjaxRequest Method (HttpRequestBase)


Determines whether the specified HTTP request is an AJAX request.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public static bool IsAjaxRequest(
	this HttpRequestBase request


Type: System.Web.HttpRequestBase

The HTTP request.

Return Value

Type: System.Boolean

true if the specified HTTP request is an AJAX request; otherwise, false.

Exception Condition

The request parameter is null (Nothing in Visual Basic).

Return to top
© 2015 Microsoft