-1

We are currently on Kentico 12 and are making the switch to 13 MVC Core.

One of our most important and widely used widgets is a custom "Control Wrapper" widget with a "File System Selector" type field, that allows the user to select a File location (via a of an .ascx user control, which then gets loaded on the page.

These user controls get and update external data from our CRM system via a REST API middleware, and display and allow our customers to view and update data. I am new to MVC and am having difficulty coming up with a similar solution, since the concept of user controls doesn't exist in MVC.

Is there a way to do this, or are there any suggestions on how to replicate this functionality in Kentico 13?

1 Answers1

0

welcome to SO!

Migrating from Portal Engine (asp.net web forms) to MVC is not an easy task, so kudos for attempting that project on your own. My suggestion for you would be to take all the User Controls (ascx) and convert those to version 13 Widgets and remove that wrapping "Control Wrapper" widget as it just complicates the whole process.

I'm sure there are some areas you can "globalize" like the overall connection and authentication to the middleware but creating version 13 widgets from your version 12 user controls is the way to go. The documentation is your friend and there quite a few blog posts and video resources as well.

Brenden Kehren
  • 5,919
  • 16
  • 27
  • Thanks for your response Brenden. The issue is that there are hundreds of these custom user controls, so creating hundreds of corresponding widgets in the Kentico CMS would be extremely tedious and unnecessary. I am thinking maybe we just need make them into view components and figure out a way the content editor can point to those through the CMS. Is that something you think would be possible in Kentico? I have read through the documentation and do not see anything similar. – Anne Kercher Aug 24 '22 at 13:40
  • 1
    If you have hundreds of user controls, you might want to rethink why you have them and what specifically each one of them is doing. We've been working with Kentico since 2008 and every project we've come across with that many custom web parts/user controls was over-engineered and best practices and standards were not followed. Not to mention, it's a developers' maintenance nightmare. We often take projects like that, simplify them and follow best practices. – Brenden Kehren Aug 31 '22 at 12:47
  • @AnneKercher another Xperience MVP has been working on a project that helps translate pages from K12 Portal Engine Widgets to KX13 Page Builder widgets. [https://github.com/KenticoDevTrev/KX12To13Converter](https://github.com/KenticoDevTrev/KX12To13Converter) This might be helpful if you need to programmatically convert the site over. – seangwright Sep 10 '22 at 16:15