views:

5

answers:

1

I have a Silverlight application hosted inside an asp.net website. In my silverlight applicaiton, if I select a theme. Then, theme changes will gets fired. I want to get notified in asp.net web page, when the theme changed event is fired inside the silverlight application.

Note: Also, I don't want to use a data base to maintain the state of the application.

+1  A: 

You can't easily raise an asp.net application event from your Silverlight App. It should be possible, but would require your SL app to do a POST request on the server with POST parameters interfacing well with the ASP.NET plumbing. It's hacking, I would say that's not the recommended way to do it and if you do it asynchronously (without reloading the page), it could do weird things with your viewstate.

You can however call a web service from the SL app when the user change the theme. (the webservice could be something as simple as a request handler or an aspx page with get parameters or maybe a WCF service)

You could then store values about the selected theme in the user session.

Maupertuis
@Maupertuis Thanks :) I'll check this.
Avatar