Getting URL back from HtmlPlaceHolder

2 posts, 0 answers
  1. Haris
    Haris avatar
    3 posts
    Member since:
    Feb 2009

    Posted 22 Mar 2011 Link to this post

    Hi,
    I am trying to get "Browser" like functionality with the HtmlPlaceHolder control. Below is my requirement:
    1. Simple page with a TextBlock and HtmlPlaceHolder
    2. By default, any URL (ex: www.google.com) is loaded as SourceUrl
    3. Search "Telerik" in google (HtmlPlaceHolder)
    4. Textblock should display the Url of the page. Similar to (http://www.google.com/#sclient=psy&hl=en&q=telerik)
    Does HtmlPlaceHolder provides this functionality? or is there any work-around?
    I've been searching for a while with no avail.
    Thanks in advance !
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 25 Mar 2011 Link to this post

    Hello Haris,

    Since I already posted an answer to the support thread you started, let me just post it here as well in case anyone else have similar issues:

    Basically the RadHtmlPlaceholder renders external pages in an IFrame object and therefore we can't control the navigation inside the IFrame once the RadHtmlPlaceholderSourceUrl is loaded.

    However, in case that you are displaying pages from your domain you can implement a javascript method to get the new url - document.getElementById("iframe").contentWindow.location.href,  and using HTMLBridge you can pass it to Silverlight:

    Still, if the RadHtmlPlaceholder SourceUrl is pointing to an external page from a different domain the access to the contentWindow attributes will be denied due to cross domain issues.

    Regards,
    Tina Stancheva
    the Telerik team
  3. DevCraft banner
Back to Top