Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ChildActionOnlyAttribute Class

Represents an attribute that is used to indicate that an action method should be called only as a child action.

System.Object
  System.Attribute
    System.Web.Mvc.FilterAttribute
      System.Web.Mvc.ChildActionOnlyAttribute

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

[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, 
	Inherited = true)]
public sealed class ChildActionOnlyAttribute : FilterAttribute, 
	IAuthorizationFilter

The ChildActionOnlyAttribute type exposes the following members.

  NameDescription
Public methodChildActionOnlyAttributeInitializes a new instance of the ChildActionOnlyAttribute class.
Top

  NameDescription
Public propertyAllowMultipleGets or sets a value that indicates whether more than one instance of the filter attribute can be specified. (Inherited from FilterAttribute.)
Public propertyOrderGets or sets the order in which the action filters are executed. (Inherited from FilterAttribute.)
Public propertyTypeId (Inherited from Attribute.)
Top

  NameDescription
Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodOnAuthorizationCalled when authorization is required.
Public methodToString (Inherited from Object.)
Top

A child action method renders inline HTML markup for part of a view instead of rendering a whole view.

Any method that is marked with ChildActionOnlyAttribute can be called only with the Action or RenderAction HTML extension methods.

For more information about using attributes, see Extending Metadata Using Attributes.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft