Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
I've just upgraded my Umbraco solution to 4.11 and am trying out the new MVC functionality. I'm having a problem getting ActionLink to work:
Using
@Html.ActionLink("Update Quantity", "UpdateQuantity", "Cart")
Returns:
<a href="">Update Quantity</a>
I thought the route might be wrong, however the following creates a button that does submit to the correct method in my controller:
@using (Html.BeginUmbracoForm("UpdateQuantity", "Cart")) {@Html.TextBox("txtQuantity", eachOrderLine.Quantity, new { @class = "qty" })<input type="submit" value="test" />}
For referrence, here is my controller code:
namespace CRuMbraco.Web.Controllers { public class CartController : RenderMvcController { public override ActionResult Index(RenderModel model) { var currentOrder = OrderHelper.GetCurrentContextOrder(); ViewBag.PurchaseOrder = currentOrder; return CurrentTemplate(model); } public ActionResult UpdateQuantity(RenderModel model) { return CurrentTemplate(model); } }}
Any suggestions very welcome,
Karl
I now understand that it's only possible to create action links to surface controllers.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Can't get ActionLink to work
Hi there,
I've just upgraded my Umbraco solution to 4.11 and am trying out the new MVC functionality. I'm having a problem getting ActionLink to work:
Using
Returns:
I thought the route might be wrong, however the following creates a button that does submit to the correct method in my controller:
For referrence, here is my controller code:
Any suggestions very welcome,
Karl
I now understand that it's only possible to create action links to surface controllers.
is working on a reply...