Select from following answers:- By using [Authorize] attribute
- By using [NoBrowser] attribute
- By using [NoBrowserRequest] attribute
- By using [ChildActionOnly] attribute

- All Above
After using [ChildActionOnly] attribute, we restrict the action method to be called only from the View not directly by giving url in the browser address bar.
We can call the Child Action Only action method by calling @Html.Action("MyPartialResponse") method.
Here MyPartialResponse is the name of the action method whose attribute is set to [ChildActionOnly].
In general, Child Action Only method returns PartialView.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator