Page jump method 1:
@Html.ActionLink("Register","Register")
@Html.ActionLink (page display text, view name)
Page jump method two: through controller
@Html.ActionLink("Home", "Index", "Home")
@Html.ActionLink(page display text, action, controller)
Page loading method:
@{Html.RenderPartial("SearchboxPartial");}: The MVC user control at this time must be placed in the same location as the caller In a directory, it can also be placed in View/Shared.
@{Html.RenderPartial("../../Views/ControlsPartial/SearchboxPartial");} The path must be accurate.
can be abbreviated as @{Html.Partial("../../Views/ControlsPartial/SearchboxPartial");}
@{Html.RenderAction("PermissionBtnsPartial","ControlsPartial");}
can be abbreviated as:
@{Html.Action("PermissionBtnsPartial","ControlsPartial");}
@{Html.RenderAction(action, controller);}
The execution order is: controller-model-view
@Html.Raw (@ViewData["PermissionBtns"].ToString())
Generally in brackets: it is a string composed of html tags, and the data is transmitted through viewData. Generally, there are actions with the same name
The execution order is controller->model->partialview->view
This kind of view can be loaded as a whole view or as a partial view, or as a partial view. It can be obtained by page jump.
js can call the controller, which also enriches the loading method of the page. Readers are asked to study by themselves.