views:

168

answers:

1

My problem is this one, I am using Sharepoint 2010, I have a form created in sharepoint designer 2010, above that form I have a silverlight webpart. Now I need to be able to access information from the silverlight webpart when I click on it and insert that information in the form below it.

Does anyone have any insight on how to do that?

Thank you in advance. Chris

A: 

You can interoperate between javascript, the DOM, and Silverlight. As a result you can do any of the following.

1) In the Silverlight code, programmatically fill in the form using HtmlPage and other items in the System.Windows.Browser namespace.

2) Have your Silverlight app pass the data to javscript function that then fills in the form

3) If your Silverlight app is not initiating the action, you can have a javascript function that calls a function in your Sillverlight app. This article explains that http://blogs.silverlight.net/blogs/msnow/archive/2008/07/08/tip-of-the-day-15-communicating-between-javascript-amp-silverlight.aspx

4) If you are wanting to rely on the Sharepoint WebPart communication channels instead of trying to access the webparts through the DOM, you can also have Silverlight fill a hidden field and then call the javascript postback function. Your code behind on your webpart can then pick up the hidden field data and send the information though the webpart communication channls.

Jacob Adams