Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hi Support,

                                    I was browsing through the provided demos of ASPxperience and I was wondering how to show HTML in the newscontrol and popupcontrol of the Newscontrol - Databinding demo.
                                    e.g. if I change the XML of "Soviets launch..." in "Major <b>Yuri Alexeyevich Gagarin</b> was fired...", the text still remains normal instead of bold.
                                    What should I do to accomplish HTML tags to be 'executed'.

                                    Sorry for my poor english ;-(




                                Hi Filip,

                                Please try the suggestions from the report HTML within AspxNewsControl Content. The main idea is to set the control's EncodeHtml property to false.

                                Does this help?

                                Check if Search Engine is able to answer questions faster than I do!


                                Hi Serge,

                                Thanks for the reply.
                                I got it working so far, except that ItemSettings.MaxLength doesn't work anymore when EncodeHTML is false?
                                Second thing I would really like is that the Popupcontrol (tail-click) also shows HTML. Although then content is filled with SetContentHTML(text), the content is still flat text.
                                (demo Newscontrol - Databinding).



                                Hi Filip:

                                We're working on your issue and will answer you as soon as possible. We're sorry for the delay.



                                Hi Filip,

                                I'm not sure that I understand your requirements. However, if you want to insert
                                any HTML markup into the ASPxPopupControl's content on the client, you can call
                                the SetContentHTML method of the ASPxClientPopupControl and pass it your
                                markup. The markup won't be encoded, i.e. it will be treated as HTML. Here is
                                an example of using the SetContentHTML method that works fine:

                                <script type="text/javascript">
                                    function OnButtonClick() {
                                        popup.SetContentHTML('Hello, <strong style="color: red;">World</strong>!');
                                <dxpc:ASPxPopupControl ID="pcPopupControl" runat="server" ClientInstanceName="popup"
                                    ShowOnPageLoad="True" CloseAction="CloseButton" Left="200" Top="200">
                                        <dxpc:PopupControlContentControl runat="server">
                                            <input type="button" value="Set Content HTML" onclick="OnButtonClick();" />




                                What I mean is: in the ASPxperience demo - the Newscontrol-databinding demo - there is an ASPxNewControl controlled by an XML datasource: ~/App_Data/NewsControlRSS.xml and there is an ASPxPopupControl. The content of the PopupControl is filled with the content of a NewsControl item.

                                Two things:
                                1) if EncodeHtml = False in the NewsControl, the ItemSettings.MaxLength won't work
                                2) if I put some HTML tags in a description of the XML file (~/App_Data/NewsControlRSS.xml), the PopupControl won't show HTML.

                                Hope I made myself clear ;-)



                                Hi Filip,

                                Thank you for the clarification.

                                1) This is actually the designed limitation of our controls. When working in EncodeHtml=False mode, it's unclear how to cut the processed text. In particular, we don't know if it's necessary to treat the characters of HTML tags (e.g. <,b,>). If we process them as regular characters, the resulting string may split a tag in parts. From the other side, if we count only the characters inside HTML tags, there may be situations when the resulting string may lack a closing tag.

                                2) The XML file in this demo uses an XSLT transformation which automatically removes all HTML tags from nodes text. As a result, the XML DataSource provides a "pure"  text without HTML tags. As a solution, you can store data in your XML file as HTML-encoded strings (where "<" is represented as "<", ">" as ">", "&" as "&", etc.). This way, the XML DataSource will provide a text with HTML tags. If you prefer this way, you can encode HTML tags using the HttpUtility.HtmlEncode method.

                                Does this make sense?



                                Exactly what I needed.


                                You're welcome, Filip :)

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners