Specify Action on sub-controller when using Html.RenderAction
Posted
by iammaz
on Stack Overflow
See other posts from Stack Overflow
or by iammaz
Published on 2009-08-10T11:07:38Z
Indexed on
2010/03/22
13:01 UTC
Read the original article
Hit count: 552
asp.net-mvc
I have a UserControl that I call with Html.RenderAction(...), so far so good..
Then I want to specify in the user control, which action should be used
Html.BeginForm("DeleteComment", "Comments", new { Id = "frmDelete" }, FormMethod.Post);%>
<%= Html.SubmitImage( "imgbtnDelete", "/image.png", new { ... })%>
<% Html.EndForm(); %>
And therein lies my problem; this calls the user control's controller/action.
What I want to happen is to call the pages action first and then be able to specify what action to call on the user control's controller.
Is this possible?? Thanks from an MVC noob
© Stack Overflow or respective owner