views:

59

answers:

2

I am new to Silverlight, so this question might seem pretty stupid. My question is, can an ASP.NET web application that's hosting a Silverlight application receive events generated by the Silverlight application? If not, how does an ASP.NET application communicate with a silverlight application?

A: 

Silverlight and ASP.NET are in different processes, and are most often on different computers. As such there is no direct linkage between the events which occur in both types of applications. Most people use Web Services either SOAP or REST to communicate.

You might use an event in the Silverlight to trigger a call to an ASP.NET web service or WCF service.

BrianLy
+3  A: 

You have essentially two wide-open paths for communication. First, Silverlight is dependent on services for data, and makes effective use of ASP.NET web services. Second, Silverlight is fully enabled for browser integration, including javascript between Silverlight and the HTML markup. So anything that Silverlight tells Javascript, or vice versa, is available to the web app in ASP.NET.

Edited to add:Also coming, and in beta now, is WCF RIA Services, which is full integration between ASP.NET and Silverlight. Service calls from Silverlight are seemlessly integrated with server code in ASP.NET.

Cylon Cat