@Ajax.ActionLink to return Partial View and update inner content div on page
Hi all, I am attempting to Render a Partial View in a div on the same page on the click event of a hyperlink via Ajax.
But everytime the href of the link is blank and instead loads the index action on the page controller. I have done this successfully in a standard MVC application but with Umbraco it refuses to work.
public class TestPageController : RenderMvcController
{
public ActionResult Index()
{
UmbracoHelper helper = new UmbracoHelper(UmbracoContext.Current);
var content = helper.TypedContent(UmbracoContext.Current.PageId);
var model = new TestModel(content);
return View(model);
}
public PartialViewResult TestPartialAction()
{
return PartialView("_testPartial");
}
}
@Ajax.ActionLink to return Partial View and update inner content div on page
Hi all, I am attempting to Render a Partial View in a div on the same page on the click event of a hyperlink via Ajax.
But everytime the href of the link is blank and instead loads the index action on the page controller. I have done this successfully in a standard MVC application but with Umbraco it refuses to work.
In My Page View I have:
In My Controller:
My Partial just has plain HTML at the moment
But the resulting markup for the anchor is:
Any help would be greatly appreciated
Hi all nevermind it was a simple mistake of not calling the Register Routes in my Global.cs file.
Hi, I have the same issue with an empty href attribute. What did you do to solve this issue?
is working on a reply...