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

HTML Place holder interaction

3 Answers 145 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
brian
Top achievements
Rank 1
brian asked on 18 Mar 2009, 07:52 AM
Hello

Is there any documentation for the htmlplaceholder control?

As far as I can see from the demos the only thing it supports is changing the url, is there no way to call javascript methods in the HTML from SL, or from JS into the SL?

Thanks
Brian

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 18 Mar 2009, 08:54 AM
Hello Brian,

Thank you for your feedback. We are currently working on providing the help for this control.

To clarify, the RadHtmlPlaceholder allows you to display any html content as part from the silverlight page layout. You can set the source to be external page by using the SourceUrl property, or you can set any html by using the HtmlSource property.

In order to call JS from Silverlight you can use the available in the Silverlight framework HtmlBridge. You can read more info here:
http://msdn.microsoft.com/en-us/library/cc645076(VS.95).aspx

Greetings,
Valentin.Stoychev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
brian
Top achievements
Rank 1
answered on 18 Mar 2009, 09:10 AM
so your iframe control will allow use of the htmlbridge in exactly the same way as normal when interacting with the page the silverlight plugin is embedded in?
0
Valentin.Stoychev
Telerik team
answered on 18 Mar 2009, 09:25 AM
Hello brian,

The short answer is Yes. The long answer is that the RadHtmlPlaceholder is using IFRAME element only if an external url is loaded, otherwise it is using a simple DIV element to position the html content over the silverlight plugin.

Here is a simple example:
RadHtmlPlaceholder1.HtmlSource = "<div id='myDiv'>my content</div>";

This will insert the DIV element in the html and then you can interact with it using the Silverlight HTMLBridge functionality just as if you were declared the DIV inside the html page without using the HtmlPlaceholder.


Best wishes,
Valentin.Stoychev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
brian
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
brian
Top achievements
Rank 1
Share this question
or