Search This Blog

Thursday, June 22, 2017

How to display another web site or custom HTML inside IFRAME embedded into an XAF View

I would like to share links to the solutions for ASP.NET WebForms apps allowing you to display arbitrary HTML content in XAF Views. For instance, one may want to use it to display HTML emails in a DetailView or load a complete third-party web site. Take special note that these custom solutions are NOT based on the built-in HTML Property Editor Module and its ASPxHtmlPropertyEditor that uses the DevExpress ASPxHtmlEditor control.

The T178588 ticket describes a very basic solution for displaying a static URL within a DetailView.
The T180499  ticket provides a more complex solution where HTML content is loaded dynamically from a business class property.



Both solutions are based on a very popular way to integrate custom controls in XAF - custom View Items. A custom ViewItem is often preferred over a custom PropertyEditor when you just need to display data without editing and other capabilities. Of course, you can choose from more integration options based on your exact business requirements: Concepts > UI Construction > Using a Custom Control that is not Integrated by Default.

It would be great to hear about whether you experienced similar scenarios and which solutions you are using for them in your Web app. Please let me know in comments to this post. Thanks.

P.S.
While we are at it, it is worth noting that we do not support displaying an XAF Web app inside an IFRAME element by default.

1 comment:

  1. Embedding an external website or custom HTML within an IFRAME in an XAF view can greatly enhance functionality and user experience. Learn more about this integration technique with hostingmella!

    ReplyDelete