Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have to use Visual Web Part that retreives data from sharepoint list and produces some custom html. I want then to render that custom html as part of the Visual Web Part. Here is the html that I need to render as part of my web part

'<iframe frameborder=' + '"' + '0' + '"' + 'scrolling=' + '"' + 'no' + '"' + 'src=' + '"' + playerUrl  +'"' + 'width=' + '"' + '100%' + '"' + 'height=' + '"' + '100%' + '"' + '</iframe>');
share|improve this question
    
What problem are you having? Do you need guidance on the Visual Web Part or the Asp.Net conventions? Are you getting an error? –  Dave Wise Jul 23 '12 at 15:04

1 Answer 1

I did something very similar when I needed to override properties of a Page Viewer Web Part.

The key is to use the System.Web.UI.HtmlTextWriter class.

http://msdn.microsoft.com/en-us/library/system.web.ui.htmltextwriter.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.