Local File in Placeholder.

4 posts, 0 answers
  1. Rhiannon
    Rhiannon avatar
    2 posts
    Member since:
    Sep 2010

    Posted 10 Sep 2010 Link to this post

    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
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 15 Sep 2010 Link to this post

    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
  3. Thomas Oates
    Thomas Oates avatar
    2 posts
    Member since:
    May 2007

    Posted 29 Dec 2010 Link to this post

    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.
  4. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 31 Dec 2010 Link to this post

    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
Back to Top