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>');
  • 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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