0

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>');
1
  • 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
    Commented Jul 23, 2012 at 15:04

1 Answer 1

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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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