In Browser SourceUrl to html file as content in the xap file

2 posts, 0 answers
  1. Jason
    Jason avatar
    30 posts
    Member since:
    May 2009

    Posted 06 Apr 2011 Link to this post

    Hi,

    I have a scenario where i want to build a simple raw html file and include it as content of the xap file then how the HtmlPlaceHolder control use its SourceUrl to point to it.  I have tried all sorts of ways to set create the uri but whenever i have a relative uri it always wants to include the location of where i came from.

    Is there a way to construct a uri that will allow the control to load up my html page included as content?  I am also in an in-browser scenario not an oob scenario.

    Thanks
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 12 Apr 2011 Link to this post

    Hello Jason,

    The RadHtmlPlaceHolder SourceUrl property is exposed to allow rendering of external pages. This means that you need to point it to a publicly visible page. Basically when you use this property the RadHtmlPlaceHolder creates an IFrame and sets its src property to the SourceUrl value of the placeholder. Then this IFrame is rendered on top of the Silverlight plug-in on the page where the Sl application is hosted.

    Therefore in your case it is better to take advantage of the HtmlSource property that allows you to set it to a string that represents an html content. In this case the RadHtmlPlaceholder will render the content (html code) defined in the HtmlSource property by placing it in a <div> element inside the page that host the SL plug-in.

    You can examine both cases in our FirstLook demo. I hope this information will help you.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top