SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

share|improve this answer

Your Answer


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.