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

Local File in Placeholder.

3 Answers 74 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Rhiannon
Top achievements
Rank 1
Rhiannon asked on 10 Sep 2010, 12:49 PM
Sorry if this is a bit of a stupid question, but im all a bit new to this and im learning :). When I attempt to use the HTMLplaceholder in a ChildWindow, im having some problems getting it to work.

When I type in http://www.google.co.uk/ into the source URL it works fine, no problem.
But if i select a local HTM file I wish to use from the dropdown menu, I get the following error message.
 

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Vids/OpenViewPH.htm

Then if I type in the whole path, including the C:\Documents and Settings\... I simply get a blank screen.

What am i doinf wrong, why cant i get my page displayed in the placeholder :( I have no doubt its something really simple!

Many Thanks, RedRain

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 15 Sep 2010, 04:24 PM
Hello Rhiannon,

Thank you for contacting us. There are differences to accessing a page depending on its location. If the html page you try to access is in the ClientBin folder (the same folder the .xap file is) the you should access it in the following manner: SourceUrl="/ClientBin/TestPage2.html". If the html page is in the root folder of the web project, the you should access it like: SourceUrl="../TestPage1.html". Please find attached a sample project demonstrating both approaches. Have a look at it and let me know if you have further questions or comments regarding this topic.

All the best,
Kiril Stanoev
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
0
Thomas Oates
Top achievements
Rank 1
answered on 29 Dec 2010, 06:47 PM
How would the path work for a out of browser app.

It seems to always have the ClientBin included.

I would like to include the HTML page as a  resource/asset.
0
Tina Stancheva
Telerik team
answered on 31 Dec 2010, 01:15 PM
Hello Rhiannon,

You can define the RadHtmlPlaceHolder like so:
<telerik:RadHtmlPlaceholder SourceUrl="/TestPage.htm"/>

Then if you want this control to display the TestPage.htm in OOB, you need to make sure that the TestPage.htm file is added as a resource with Build Action - Content and Copy Always to output directory. Also, you need to set the Web project output directory to the Web project ClientBin directory (HtmlPlaceholder.Web/ClientBin). You can examine the attached project where the Debug settings of the SL project are defined to open it as a OOB application and the .Web project properties are modified to point to the ClientBin folder as an output path. You can also examine the TestPage.htm file properties.  I hope this info will help you.

Best wishes,
Tina Stancheva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
HTMLPlaceHolder
Asked by
Rhiannon
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Thomas Oates
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or