1
Reply

How to restrict an actionmethod being called from a RedirecttoAction method in MVC?

aravazhi k

aravazhi k

4y
2.8k
1
Reply

How to restrict an actionmethod being called from a RedirecttoAction method in MVC?

    Decorate that action method with [ChildActionOnly] attribute.

    With [ChildActionOnly] attribute annotated, an action method can be called only as a child method from within a view.