This is a migrated thread and some comments may be shown as answers.

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

1 Answer 23 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 06 Apr 2011, 07:32 PM
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

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 12 Apr 2011, 09:26 AM
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
Tags
HTMLPlaceHolder
Asked by
Jason
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or