Personally, I recommend using for Html.RenderAction () for cross-cutting issues like these.
Your contact form handler must exist regardless of the page you are currently viewing, so you have three options:
- Manually add it to the response of the current action.
- Manually add it to the response of the current controller through a base controller that modifies the ViewState or ViewModel
- Call RenderAction () HtmlHelper inside the current view
3 , , 1 2 ( ), . RenderAction(), , , .