asp.net mvc - What is an MVC child action? -
i read child actions in mvc (fundamental book), don't know is?
could 1 please explain these methods?
phil haack explains nicely in this blog post. child action controller action invoke view using html.action
helper:
@html.action("someactionname", "somecontroller")
this action execute , render output @ specified location in view. difference partial partial includes specified markup, there's no other action executing main action.
so have main action received request , rendered view, within view render multiple child actions go through independent mvc lifecycle , render output. , happen in context of single http request.
child actions useful creating entire reusable widgets embedded views , go through independent mvc lifecycle.
Comments
Post a Comment