In ASP. net mvc, @ Html. Partial, @ Html. Action, @ Html. RenderPartial, @ Html. RenderAction,
1. View of the Action and RenderAction loading method, perform the order of Controller → Model → View, and then bring the generated page back to the
MVC renderaction RenderPartialBoth the html.renderpartial and Html.renderaction methods are used to embed user controls on the interface.Html.renderpartial is to embed the user control directly on the interface:OrNote: When using the first method,
1. the return value of the render method is void, which is output within the method. The return value type without the render is mvchtmlstring. Therefore, you can only use the following method:
@ Html. Partial @ {html. renderpartial (...) ;}@ html.
In ASP. @html.partial, @Html. Action, @Html. renderpartial, @Html. Renderaction differencesMake a summary of these four differences, clean up the idea, convenient for later use:1. The return value of the method with render is void, output inside the
From Zhang Ziyang: http://www.cnblogs.com/JimmyZhang/archive/2009/01/03/1367644.html
This tutorial explores the topics of ASP. net mvc controller, controller action, and action result. After reading this tutorial, you will understand how the
reproduced from: "ASP. @Html. @Html. Action @Html. renderpartial @Html. Renderaction differences"Copy it over first.The return value of the method with render is void, output inside the method, and the return value type without render is
1. The return value of the method with render is void, output inside the method, and without the return value type mvchtmlstring, so use:@Html. Partial corresponds to @{html.renderpartial (...);}@Html. Action corresponds to @{html.renderaction (...);
1. The return value of the method with render is void, output inside the method, and the return value type is mvchtmlstring, so this can only be used:@Html. Partial corresponds to @{html.renderpartial (...);}@Html. Action corresponds to
Asp. Net MVC-Controller And Action, asp. netmvc
1. Understanding Controllers
1.1. What is a controller?
The Controller is A. NET class that includes necessary request processing. The controller role encapsulates the application logic. The controller
HTML. Action () and HTML. RenderAction () are similar to HTML. Partial () and HTML. RenderPartial () auxiliary methods. The Partial auxiliary method usually applies view tags in a separate file to help the view render a part of the view model. On
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.