Not able to call action during submit in RenderMvcController
Hi All,
I am new to ASP.Net MVC integration in Umbraco.
We have created a controller inherited from RenderMvcController and has define the following method in that controller
public System.Web.Mvc.ActionResult Index(RenderModel model)
{
//Here POCModel is the model implementing IPublishedContent interface.
POCModel obj = new POCModel(model.Content, Umbraco);
return base.Index(new RenderModel(obj));
}
It is working fine as all the properties initialized in the POCModel is getting written on the view. Now we are thinking of creating the form on that page and submitting the data using that form and collecting the data in the action of the controller which is inheriting from RenderMvcController. When we submit the data using the form the call is getting send to the Index action only and not to the action which we have defined. Here is the action which we have defined.
[HttpPost]
public void DoSomeAction(POCModel obj)
{
}
Here is the form which we have defined in the Template
Not able to call action during submit in RenderMvcController
Hi All,
I am new to ASP.Net MVC integration in Umbraco.
We have created a controller inherited from RenderMvcController and has define the following method in that controller
public System.Web.Mvc.ActionResult Index(RenderModel model) { //Here POCModel is the model implementing IPublishedContent interface.
POCModel obj = new POCModel(model.Content, Umbraco); return base.Index(new RenderModel(obj)); }
It is working fine as all the properties initialized in the POCModel is getting written on the view. Now we are thinking of creating the form on that page and submitting the data using that form and collecting the data in the action of the controller which is inheriting from RenderMvcController. When we submit the data using the form the call is getting send to the Index action only and not to the action which we have defined. Here is the action which we have defined.
[HttpPost]
public void DoSomeAction(POCModel obj)
{
}
Here is the form which we have defined in the Template
@using (Html.BeginForm("DoSomeAction", "FirstPocforMvcsite"))
{
}
Please help me on this.
is working on a reply...