Building Silverlight 4 Business Application

I'm developing my basic ASP.NET web app into a rich silverlight UI interface to make use of the silverlight controls and media element.

Currently I use ASP.NET aspx pages to handle everything, with only the charting using silverlight. (Visifire)

I've now started to recreate the pages using the Business Application Template in VS2010. I'm looking to have all pages in the Silverlight app, with the ASP.NET web project handling the data access layer and returning the data back to the silverlight app, to produce the charts and reports.

So, the thing I don't understand is how to pass parameters from the silverlight UI, to the stored procedures I use to return the charting/report data, and return the dataset/datatable to the silverlight app.

The Silverlight UI currently consists of:

> a ComboBox where the user can select the Meter. The selectedvalue of this has to be passed to the Stored procedure.

> a Calendar where the user can select the day. This also needs to be passed to the stored procedure

The class in the Web app does the work of executing stored procedure and returning the data to a datatable, but how can I get that datatable into my silverlight app??

I'm basically stuck on how to pass parameters to the web app, process the SP and return the datatable to the silverlight app. I'm sure I'm missing something simple.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can try to use ADO.NET Data Services or WCF Web Services to perform database operations such insert, retrieve data in Silverlight.

Check the following links

Silverlight and Data Communications

Basic Database Operations in Silverlight 3.0

calling table and stored procedure in silverlight

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aaron JabamaniTechnical ArchitectCommented:
Create a Interface which can be either Web service or WCF and they make use of application to process the request, if you don't want to re-create your business logic.

Let the silverlight talks to WCF or Web Service. Make the calls Asynchronous.
wint100Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.