Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom van Enckevort 107 posts 429 karma points
    Apr 19, 2013 @ 17:31
    Tom van Enckevort
    0

    Ajax.ActionLink with a SurfaceController

    I'm trying to create an Ajax.ActionLink to a method in my SurfaceController, but the generated URL is not right.

    @Ajax.ActionLink("MyMethod", "MySurface", new AjaxOptions())

    This generates the URL: http://mysite/umbraco/RenderMvc/MySurface

    Where as I was expecting a URL like: http://mysite/umbraco/Surface/MySurface/MyMethod

    Any ideas why this isn't working? Things work fine when I create an Ajax form using Ajax.BeginForm

    I'm using Umbraco v6.0.3 BTW.

  • Tom van Enckevort 107 posts 429 karma points
    Apr 19, 2013 @ 18:11
    Tom van Enckevort
    0

    Managed to get it working by adding the link text as the first parameter:

    @Ajax.ActionLink("LinkText", "MyMethod","MySurface",newAjaxOptions())

    Not sure why the other ActionLink overload gives back a different URL.

Please Sign in or register to post replies

Write your reply to:

Draft