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

How to set parameters for a silverlight object from asp.net on object loading

2 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 04 Dec 2009, 10:14 AM
Hello,

I want to include silverlight objects in my web site, (this site is using radAjax.net intensivelly).
I am new to silverlight (2 apps :) )
I create the silverlight <object> from codebehind and I want to know if there is some way to set initial parameters to this object which could be injected when the xap is loaded ?

Is there a way for the Telerik object to communicate using Ajax.net with my page instance which is ajaxfiied with RadAjaxManager.

Moreover, what is the Telerik recommandations concerning the best way for the silverlight/telerik control to communicate with its server in term of execution speed, easy dev, easy deployment: you present WCF,ADO.NET,Web Service, RIA ?

Thank you for recommandations

CS

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 09 Dec 2009, 09:56 AM
Hi Christian Surieux,

 You can sue the "initParams" parameter for the silverlight object to pass parameters to the Silverlight application when it is initialized:

http://msdn.microsoft.com/en-us/library/cc189004(VS.95).aspx
http://blogs.silverlight.net/blogs/jesseliberty/archive/2008/12/26/passing-parameters-into-silverlight-applications.aspx

Generally there is no direct integration between the Telerik Ajax and Silverlight controls. We have not found many scenarios for which we can provide support out-of-the-box because these kind of requirements tend to be application specific. One exception is the upload control:

http://demos.telerik.com/aspnet-ajax/upload/examples/silverlight/defaultcs.aspx

If you want to communicate between JavaScript and Silverlight, you can use the Html Bridge:

http://msdn.microsoft.com/en-us/library/cc645076(VS.95).aspx
http://silverlight.net/learn/quickstarts/htmlbridge/

As back-end communication we cannot suggest a particular approach as "best' because again this may very much depend on your application.

Things to keep in mind:
 - The .NET RIA Services will provide the best integration with Silverlight, but is still in beta and hosting it is a problem. (Requires full trust)
- The ADO.NET data services 1.5 are still in beta and cannot be used in a production environment. The 1.0 version lacks a lot of things that an application may need. Generally they allow exposing data in a very elegant way.
- The standard WCF services is a good choice in the short term - they are available now and are supported.

Unfortunately I cannot suggest what may be best in your case.

Kind regards,

Miroslav
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSurieux
Top achievements
Rank 2
answered on 09 Dec 2009, 10:58 AM
Thank youMiroslv,

Very helfull at my level of Silverlight knowledge.
I especially appreciate the point concerning RIA full rust necessity, ADO.NET and WCF.

Silverlight is interesting but still seems to be years beyond Flash ?
Telerik is a great help starting with it.

Best regards
CS
Tags
General Discussions
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Miroslav
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or