Copied to clipboard

Flag this post as spam?

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


  • SkaberDk 2 posts 72 karma points c-trib
    Oct 12, 2022 @ 07:01
    SkaberDk
    0

    Using C sharp to create propertyEditor (.cshtml)

    Hey guys. This is first time im trying to make a custom property editor. I followed the example but I was wondering if their is any way I can use property.cshtml and C Sharp to handle the data insteat of using Angular?

    https://our.umbraco.com/documentation/Tutorials/Creating-a-Property-Editor/part-3

  • Roy Berris 89 posts 576 karma points c-trib
    Oct 13, 2022 @ 10:56
    Roy Berris
    0

    Hi,

    You can kind of, but not recommended for most operations.

    What you could do is create an authorized api controller which houses the logic. Extend UmbracoAuthorizedApiController. (Endpoint will be /umbraco/api/...) Documentation here.

    In your controlled do whatever you need to. Then connect to the API controller from your Angular code (you'll still need to write this part). And also write any response back to the store in Angular.

    But no, there is no built-in way to make C# do this out of the box that I am aware of.

Please Sign in or register to post replies

Write your reply to:

Draft