Skip to main content

Posts

Showing posts with the label prevent partial view in mvc 5 c#

prevent partial view in mvc 5 c#

We can prevent the partial view in MVC 5 using   ChieldActionOnly attribute on Partial-view action method in the  controller . The below example might help you. [ChildActionOnly] public PartialViewResult Partial(string id) { return PartialView(); }