We help IT Professionals succeed at work.

Silverlight wait for ASP.NET code to complete

I have a project with a silverlight control and some ASP.NET code to work with a WSHttpBinding, because Silverlight doesn't seem to work with WSHttp. I can pass objects from Silverlight to ASP.NET and back using serialization, and I have my ASP.NET code fire when a hidden field changes(it gets populated from the silverlight side). Is there some way I can get some Silverlight code to fire when I change the value of another ASP.NET hidden field (where I pass it a list object)? And/or could I somehow get Silverlight to wait for the ASP.NET code to finish executing?
Watch Question

Manoj PatilSr. Software Engineer

Aaron JabamaniTechnical Architect

Use javascript.  You can call methods inside silverlight from aspx page and  vice versa.

check out the link, http://blogs.silverlight.net/blogs/msnow/archive/2008/07/08/tip-of-the-day-15-communicating-between-javascript-amp-silverlight.aspx
I found that WCF seems to be the most elegant solution. I added a WCF service to my ASP.NET solution that is easily used by my silverlight application. It works like a charm.


I felt that the most elegant solution was to build and use a WCF service.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.