Good day!
I have an application where I can include iframe with two different HTML-site-wide master pages for the normal page and a different design design (HTML code) and other master pages. One is for the.
Now I have a controller with some actions. Idea for the normal page, the time to create IFRAME version is the form field, validation and processing is the same, so I want to make it dry as possible.
Is it possible to inherit this controller to be able to create a new view? Namespace My Controllers {Public Class SomeController: Base Controller {[HTTPGATE} Public Action Result Process MyForm () {...} [HTTP Post] Public Action Result Process Mimeform (Form Collection Form) ) {...}}}
View and In various views, ? You can only try to cross a query to your ActionResult handler, which address To do that service is to serve. And if you want to map different routes for this handler, then you can do the following / view / MyController
namespace MyControllers {The public class will be in someControllerWithDifferentViews: some controllers {// here nothing}}
/ view / What will happen in some controller widespread visual [/ code>
[HTTP Post] Public Functioning Processform (Form Collection Form, B Ool isIFrame) {... Kick ... ... (ififrame) {Return View ('MyFormIFrame')} and {See Return ('MyForm'); }}
routes.MapRoute (" MyForm "," / mycontroller / verb ", new {controller =" microcontroller ", action =" process myoform ", IIFRM = FAP,}); Routes MapRoute ("MyFormIFrame", "/ mycontroller / action-iframe", new {controller = "mycontroller", action = "process myoform", isIFrame = true,});
Comments
Post a Comment