Copied to clipboard

Flag this post as spam?

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


  • Andrew Simpson 8 posts 78 karma points
    May 02, 2018 @ 14:08
    Andrew Simpson
    0

    Controller not being found

    Hi,

    @newbie here!

    I have created 2 Templates.

    The 1st is my Landing Page under Home node.`

    @inherits UmbracoTemplatePage
    
    <div class="container">
        @{Html.RenderAction("SayHello", "PortalSurface");} </div>
    

    `This 'hits' my Controller which is this:

    using Umbraco.Web.Mvc;
    using System.Web.Mvc;
    namespace FuelCard.Portal.Cms.Controllers
    {
        public class PortalSurfaceController : SurfaceController
        {
            public const string PARTIAL_VIEW_FOLDER = "~/Views/Partials/";
            public ActionResult SayHello()
            {
                return PartialView(PARTIAL_VIEW_FOLDER + "_Portal.cshtml");
            }
        }
    }
    

    So, this will load my _Portal view inside Home.

    The problem is the ActionLinkI am trying to use from _Portal which is this:

    <section class="section">
        <div class="container">
            <div class="row col-xs-12" style="padding: 40px; background-color: beige; font-size: 24px">
                Welcome to Fuel Card Portal
            </div>
            @Html.ActionLink("Card2", "Index", "../Card/CardSurface")
        </div>
    </section>
    

    The Error I get returned is this:

    GET http://localhost:61184/umbraco/js/canvasdesigner.panel.js 404 (Not Found)

    It is not finding my Controller.

    This my Folder/Solution structure:

    enter image description here

    any pointers for poor dim me?

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft