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

Getting URL back from HtmlPlaceHolder

1 Answer 55 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Haris
Top achievements
Rank 1
Haris asked on 22 Mar 2011, 04:41 PM
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 !

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 25 Mar 2011, 03:46 PM
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
Tags
HTMLPlaceHolder
Asked by
Haris
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or