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 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:
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "updateView"
In My Controller:
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);
public PartialViewResult TestPartialAction()
My Partial just has plain HTML at the moment
But the resulting markup for the anchor is:
<a data-ajax="true" data-ajax-method="GET" data-ajax-mode="replace" data-ajax-update="#updateView" href="">Click Here</a>
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...
Write your reply to:
Image will be uploaded when post is submitted