Click here to Skip to main content
15,119,786 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
If silverlight is client side framework and it is used for developing web applications, then how does it interact with the server. If I am developing a web site in silverlight which also deals with the SQL server, How will it postback to the server?

You MUST use a web service to interact with a database from Silverlight. This link should get your started:[^]
Though Application is running from client side but It will always be live with the server. And interacts with server Asynchronously rather then loading and requesting page each time you are doing with ASP.Net mechanism.

You could use tool called fiddler[^] to have a watch every time SL apps requesting to server.

And for more information regarding silverlight App lifecycle you could refer MSDN[^].
Pravin Patil, Mumbai 19-Jan-11 7:19am
But still, how does silverlight decide as to which code is to be executed on client and which code is to be executed on server....?
Hiren solanki 19-Jan-11 7:22am
AFAIK all the code is executed at serverside client is just presenting.
lmoelleb 19-Jan-11 8:14am
No. Silverlight code executes client side.
Hiren solanki 19-Jan-11 8:27am
You just please put as a reply to person to whom you want to notify on. hover on pravin patil comment and click reply.
Add a WCF service to the website hosting the Silverlight app.

Then in the silverlight code, add a service reference to the WCF service.

Google: calling wcf from silverlight

gives you plenty of tutorials etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900