Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Dynamic contents
3 replies. Latest Post by jasonxz on September 12, 2007.
(0)
eustaquio
Member
4 points
4 Posts
09-12-2007 2:07 PM |
I´m web developer especially with database access.
I hope from silverlight 1.0 more than I think is it, because I see silverlight how an amazing technology for present "ugly data" beautifully.
I know that silverlight hasn´t support to databind and not support web service.
How can i to show dynamic data?
ASP.NET has all logic in the server (except AJAX), each page is a simple interface that postback information to server an server sends a new interface generated to browser. It´s possible or logic to do this with silverlight?. Example. A silverlight content (xaml), sends information to server (postback), and server generates dynamically a new xaml content loaded in browser (or silverlight control).
Thanks a lot.
I´m sorry for my english.
jasonxz
Participant
1752 points
530 Posts
09-12-2007 2:27 PM |
Silverlight communicates with the server through web services (script services to be exact). That's how you will have to create database-driven SL apps.
As far as the server generating XAML and sending it back to the client, you can do this. It's not the best way to generate your interfaces, though. The problem with how it's done in most internet applications is that they do generate the entire interface on the server and transfer it across the slow wires that are the internet. Instead, with silverlight, you should, through a web service, provide data to the SL application that you've built and is running on the client, and let the client's machine generate the interface using your code.
This does a couple of things for you:
09-12-2007 2:39 PM |
Thanks, it´s fun, but, does silverlight (1.0 or 1.1) has webservice support? I think that not..., if yes it is a great surprise.
Another question, which is the better method to rewrite content loaded, creating and destroying objects or replacing xaml code?.
Thanks again.
09-12-2007 2:51 PM |
Yes, SL does support web services. But, like ASP.NET AJAX, they must be registered as a Script Service. If you go to your SL project, right click and you will find an option to add a Web Reference. Now, to be more specific, SL allows the client to execute a Script Service on the server. The Script Service does not reside in your SL application, but on the web site that hosts your SL application.
The answer to your 2nd question really depends on your situation. Creating and destroying the SL ActiveX object in the browser is probably the easiest way, but if you destroy your SL ActiveX object and recreate it, you've just destroyed any data that you were persisting in the app.