ChildActionOnly says it can only be used in View by Html.Action or Html.RenderAction .
And NoAction says it doesn't a Action ,so it can't called via this url(ControllerName/ActionName)
Best regards,
Jolie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
7 Points
51 Posts
partial view and childActionOnly attribute
Apr 05, 2017 06:41 AM|DevManNZ1981|LINK
Hi
I know what is partial view and childActionOnly attribute. But don't know what to use when?
Regards
Contributor
5200 Points
2307 Posts
Re: partial view and childActionOnly attribute
Apr 06, 2017 07:13 AM|AngelinaJolie|LINK
Hi Dev,
For the partial view , it just like User Control in WebForm ,it means when we need to reuse it in our page .
For example ,
The better example ,please refer to : https://chsakell.com/2013/05/07/partial-views-and-child-actions-in-asp-net-mvc/
ChildActionOnly says it can only be used in View by Html.Action or Html.RenderAction .
And NoAction says it doesn't a Action ,so it can't called via this url(ControllerName/ActionName)
Best regards,
Jolie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.