Copied to clipboard

Flag this post as spam?

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


  • Scott 3 posts 83 karma points
    Jul 08, 2022 @ 02:12
    Scott
    0

    No route in the route table matches the supplied values.

    I have the following partial view, which is called LatestTweetsNew.cshtml :

    @model string
    <h1>
        Load the tweets for @model
    </h1>
    

    I have a SurfaceController as shown here, which is meant to render the partial view:

    public class TwitterController : SurfaceController
    {
            public ActionResult GetTweets(string twitterHandle)
            {
                string PARTIAL_VIEW_FOLDER = "~/Views/Partials";
    
                return PartialView(PARTIAL_VIEW_FOLDER + "/LatestTweetsNew.cshtml", twitterHandle);
            }
    }
    

    I try to render the partial view on my Home.cshtml

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.Home>
    @using ContentModels = Umbraco.Web.PublishedModels;
    @using Umbraco.Core.PropertyEditors.ValueConverters;
    
    @{
        Layout = "Main.cshtml";
    }
    
    @Html.Partial("Hero")
    @Html.Partial("CallToAction")
    
    
    <!-- Latest News Articles -->
    @Html.Partial("LatestNews")
    
    @Html.Action("GetTweets", "Twitter,", new { twitterHandle = "HDeveloped" })
    

    Yet I get: enter image description here

  • Andrey Karandashov 23 posts 215 karma points c-trib
    Jul 08, 2022 @ 08:29
    Andrey Karandashov
    100

    You have a typo in controller name:

    Twitter, -> Twitter
    
  • Scott 3 posts 83 karma points
    Jul 08, 2022 @ 09:05
    Scott
    0

    Helps to get fresh eyes, been staring at it for far to long. Thanks.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies