Displaying Graphs with an Object Oriented Approach using Silverlight SDK and Visual Studio 2008
(Page 1 of 5 )
In this article, we will focus on developing a Silverlight application which consumes an ASP.NET web service and presents data in the form of a bar graph using Visual Studio 2008. We will follow a simple object oriented approach for creating dynamic Silverlight objects using Silverlight SDK.
A
downloadable zip file is available for this article.
If you are new to developing Silverlight applications, I strongly suggest you to go through my first walkthrough article in this series.
The entire source code for this article is available in the form of a downloadable zip file. The solution was developed using Microsoft Visual Studio 2008 Beta 2 and Microsoft Silverlight 1.1 Alpha on Microsoft Windows Server 2003 Enterprise Edition with Microsoft SQL Server 2005 Enterprise Edition. I didn’t really test it in any other environment. I request that you post in the discussion area if you have any problems with execution.
Understanding the Visual Studio solution
Once you download the source code, you will find a folder named “SilverlightSampleWithWebService.” This contains a Visual Studio 2008 solution with three projects.
NorthwindService
SilverlightTest
SilverlightTest2
First of all, the above projects must be configured on same web server (IIS) you will use for testing the solution. Make sure that all of the above web sites are configured with ASP.NET 2.0 runtime (in IIS). Do not forget to provide security to the web site and folders. All of these steps are explained in greater detail in my previous article.
Once you open the above Visual Studio 2008 solution, the solution explorer looks like the following screen shot:

“NorthwindService” is an ASP.NET web service which provides information (data) to consumers by accessing data from the database. “SilverlightTest” simply displays a particular product and its sale value along with a representation of a graph (comparing all product sales). “SilverlightTest2” further extends “SilverlightTest” with an object oriented approach for presenting multiple rows of data along with the graph representation.
Next: Understanding the ASP.NET 3.5 Web Service >>
More ASP.NET Articles
More By Jagadish Chaterjee