Developer forum

Forum » Development » Usercontrols in dw9

Usercontrols in dw9

Mikkel Toustrup Olsen
Reply

Hi all,

According to the documentation, the possibility of inserting a .ascx usercontrol has been removed in dw9. The Load tag has been removed as well.

is it possible to load the usercontrol in a page/parahgraph razor template withouth doing it through Dynamicweb?

I'm asking for a customer who are about to upgrade to dw9, however we obviously need to take the above mentioned into account :)

BR Mikkel


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Mikkel,

It found this old blog post on the interwebs...https://blog.krusen.dk/render-html-of-user-control/

That is more or less what the "Insert ascx control" (LoadControl) feature did. It doesn't support all features of ascx controls, but if your control worked with the old feature in Dynamicweb then this code should work as well. There's no guarantee though ;)

Best regards,
Morten

 
Mikkel Toustrup Olsen
Reply

Hi Morten,

Thanks, I'll give it a read and a try.

If it by some chance doesn't work. Do we have any equivalent or whatsoever to utilize?

The customer are currently using these in order to make their customers signup for a lot of different stuff. Mainly classes / courses etc and by that have a pretty strict backend validation to their integration system. 

BR Mikkel

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

It depends on your requirements, but here are some options...

  • Create an aspx and add the ascx control to it. Then load that aspx in an iframe.
  • Implement the code directly in a razor template, custom app or some other extension.
  • Use items and the item creator app (with custom extensions for validation, if needed).
  • Use forms for data lists (with custom extensions for validation, if needed).

 

You must be logged in to post in the forum