C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
8
Reply
What is NonActionAttribute ?
Alankar Bhoasle
10y
4k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
If you want to restrict a particular method from accessing Get and Post Method then you represent [Nonaction] attribute
Shailesh Uke
10y
2
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.
lokaprakashraju p
10y
1
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.
Alankar Bhoasle
10y
1
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
Ajay Gandhi
10y
0
-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() { }
Jaipal Reddy
10y
0
https://msdn.microsoft.com/en-us/library/system.web.mvc.nonactionattribute%28v=vs.118%29.aspx
Khan Abrar Ahmed
10y
0
Which does not come under the category of HTTPGET & HTTPPOST attributes. Its just like a normal method.
Srikanth Reddy
10y
0
This is the action filter attribute, used to indicate this method of controller is not an action method.
Munesh Sharma
10y
0
What are the settings to be done for the Routing to work properly in an MVC application ?
In an MVC application, what are the segments of the default route ?
Message