Alankar Bhoasle
What is NonActionAttribute ?
By Alankar Bhoasle in Web Development on Jun 10 2015
  • Shailesh Uke
    Jun, 2015 17

    If you want to restrict a particular method from accessing Get and Post Method then you represent [Nonaction] attribute

    • 2
  • lokaprakashraju p
    Jun, 2015 16

    If you want to restrict a particular method from accessing using a url like other action methods and you want to declare that method as public inorder to access it from some other controller then decorate that method with [Nonaction] attribute.

    • 1
  • Alankar Bhoasle
    Jun, 2015 10

    Represents an attribute that is used to indicate that a controller method is not an action method.It is already known that all the public methods of a controller class are basically treated as action methods. If you don't want this default behaviour, then you can change the public method with NonActionAttribute. Then, the default behaviour changes.

    • 1
  • Ajay Gandhi
    Nov, 2015 20

    NonAction is an attribute, it is used to represent that a controller method is not an action method.Purpose: We known that all public methods of a controller class are basically treated as action methods. So restrict that we applying Nonaction attributeBy using this we changing the default behaviour

    • 0
  • Jaipal Reddy
    Jun, 2015 17

    -Usually, MVC consider all public methods of a controller class as action methods. -You can make some of the methods as non action methods by using the NonActionAttribute attribute.example:[NonAction] private void DoSomething() { }

    • 0
  • Khan Abrar Ahmed
    Jun, 2015 16

    https://msdn.microsoft.com/en-us/library/system.web.mvc.nonactionattribute%28v=vs.118%29.aspx

    • 0
  • Srikanth Reddy
    Jun, 2015 16

    Which does not come under the category of HTTPGET & HTTPPOST attributes. Its just like a normal method.

    • 0
  • Munesh Sharma
    Jun, 2015 16

    This is the action filter attribute, used to indicate this method of controller is not an action method.

    • 0