Copied to clipboard

Flag this post as spam?

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


  • Jeppe Bentzen 1 post 21 karma points
    Aug 11, 2022 @ 12:26
    Jeppe Bentzen
    0

    Umbraco HeartCore Url parameters in .NET MVC

    I am working on a Umbraco Heartcore project and is looking to implement some sort of parameter system which can be read in my .NET MVC framework.

    To be more specific, in the github .net sample it has this in the index method of the controller:

    public IActionResult Index()
        {
            var content = (Textpage) _umbracoContext.CurrentContent;
    
            return View(content);
        }
    

    How would i also return a parameter when returning the view? Would it be better to get the parameter in the Model/ViewModel instead?

    The parameter would be used to fetch data externally, and display it on the site.

    Note: I am using the github headless.client.samples.web sample, and the default Umbraco website template.

Please Sign in or register to post replies

Write your reply to:

Draft