troubleshooting Question

Modal popup in Sharepoint not rendering > or < properly

Avatar of hmcgeehan
hmcgeehan asked on
C#ASP.NETMicrosoft SharePoint
12 Comments1 Solution906 ViewsLast Modified:
Hi
I have a web part which displays a gridview of data (each row shows data about a document - title, publication date, author etc etc)

The cell with the title is a link which opens a modal popup which displays some text.
That works fine.
The problem is if I try to do something like ...

Label popupText = WebPart.Factory.CreateLabel("<iframe src='news.html' width='40%' height='80' align='right'><p>See our <a href='news.html'>newsflashes</a>.</p></iframe>", "", popupContentPanel);


it renders as ...

&lt;iframe src=&#39;news.html&#39; width=&#39;40%&#39; height=&#39;80&#39; align=&#39;right&#39;&gt;&lt;p&gt;See our &lt;a href=&#39;news.html&#39;&gt;newsflashes&lt;/a&gt;.&lt;/p&gt;&lt;/iframe&gt;

Any ideas?
TableRow resultTableRow = WebPart.Factory.CreateTableRow(TemplateCssSuffix("resultTableRow"), resultTable);
                    {
                        // title
                        TableCell titleTableCell = WebPart.Factory.CreateTableCell(TemplateCssSuffix("titleTableCell"), resultTableRow);
                        {
                            //link that fires the modal...
                            HyperLink hlTitleFireModal = WebPart.Factory.CreateHyperlink("", string.Empty, string.Empty, false, "imageLink", titleTableCell);
                            hlTitleFireModal.DataBinding += new EventHandler(hlTitleFireModal_DataBinding);

                            Panel popupPanel;
                            Panel popupContentPanel;

                            popupContentPanel = WebPart.Factory.CreateBasicPopupPanel(hlTitleFireModal, titleTableCell, out popupPanel);
                            {
                                Image popupImage = WebPart.Factory.CreateImage("", "popupImage", popupContentPanel);
                                Label popupText = WebPart.Factory.CreateLabel("<iframe src='news.html' width='40%' height='80' align='right'><p>See our <a href='news.html'>newsflashes</a>.</p></iframe>", "", popupContentPanel);
                            }

                        }
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros