<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Steve Fox's OBA Ramblings : Advanced OBA</title><link>http://blogs.msdn.com/steve_fox/archive/tags/Advanced+OBA/default.aspx</link><description>Tags: Advanced OBA</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>get trained with Sharepoint 2010 and office 2010 videos</title><link>http://blogs.msdn.com/steve_fox/archive/2009/12/05/get-trained-with-sharepoint-2010-and-office-2010-videos.aspx</link><pubDate>Sat, 05 Dec 2009 17:01:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9932982</guid><dc:creator>Steve Fox</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/steve_fox/comments/9932982.aspx</comments><wfw:commentRss>http://blogs.msdn.com/steve_fox/commentrss.aspx?PostID=9932982</wfw:commentRss><description>&lt;p&gt; One of the charters of my team is to make sure that we provide collateral for developers to get up and running with a program called Metro—an early adoption program for ISVs (to sign up for Metro or get more information, you can email &lt;a href="mailto:metroreq@microsoft.com"&gt;metroreq@microsoft.com&lt;/a&gt;). Part of this program is creating things like training videos, Hands-on labs, and source-code; all for the developer to get up to speed quickly and efficiently with SharePoint and Office 2010. (We also cover CRM and UC.)&lt;/p&gt;  &lt;p&gt;One of the first publicly-facing things we’ve done is to begin posting our PowerPoint decks and SharePoint and Office 2010 developer videos on Channel 9 in our new Learning Centers as a complement to other collateral that is out there today. There are some great videos here that you can watch for 10-15 minutes at a time. To get them, navigate to the top-level learning center on Channel 9 (&lt;a title="http://channel9.msdn.com/learn/" href="http://channel9.msdn.com/learn/"&gt;http://channel9.msdn.com/learn/&lt;/a&gt; or go straight to the either of the learning centers:&lt;/p&gt;  &lt;p&gt;SharePoint 2010: &lt;a title="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/" href="http://channel9.msdn.com/learn/courses/SharePoint2010Developer/"&gt;http://channel9.msdn.com/learn/courses/SharePoint2010Developer/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Office 2010:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/learn/courses/Office2010/" href="http://channel9.msdn.com/learn/courses/Office2010/"&gt;http://channel9.msdn.com/learn/courses/Office2010/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/gettrainedwithSharepoint2010andoffice201_7ED6/new_9guy_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="new_9guy" border="0" alt="new_9guy" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/gettrainedwithSharepoint2010andoffice201_7ED6/new_9guy_thumb.png" width="209" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are some great videos here, and the guys (Donovan Follette and Paul Stubbs) have done a fantastic job rallying this content. &lt;/p&gt;  &lt;p&gt;There’ll be more to come with full downloadable packages coming next week and hands-on labs and source code coming at the beginning of January.&lt;/p&gt;  &lt;p&gt;Happy Coding!&lt;/p&gt;  &lt;p&gt;Steve&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932982" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/OBA/default.aspx">OBA</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/SharePoint+development/default.aspx">SharePoint development</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Advanced+OBA/default.aspx">Advanced OBA</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/sharepoint+2010/default.aspx">sharepoint 2010</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Office+2010/default.aspx">Office 2010</category></item><item><title>OBA Sample Application Kit for SAP &amp;amp; Siebel Released to Web</title><link>http://blogs.msdn.com/steve_fox/archive/2009/06/08/oba-sample-application-kit-for-sap-siebel-released-to-web.aspx</link><pubDate>Tue, 09 Jun 2009 00:57:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9709691</guid><dc:creator>Steve Fox</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/steve_fox/comments/9709691.aspx</comments><wfw:commentRss>http://blogs.msdn.com/steve_fox/commentrss.aspx?PostID=9709691</wfw:commentRss><description>&lt;p&gt;Over the past few months, we’ve received some very positive feedback on the OBA Sample Application Kits that we’ve released. Well, today we release to web the latest in the family of kits, the &lt;a href="http://code.msdn.microsoft.com/sapsiebel"&gt;OBA Sample Application Kit for SAP &amp;amp; Siebel&lt;/a&gt;. Included in this kit are: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Overview whitepaper &lt;/li&gt;    &lt;li&gt;Source code&lt;/li&gt;    &lt;li&gt;Installation guide&lt;/li&gt;    &lt;li&gt;Developer guide&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;As per the diagram below, this latest OBA kit provides guidance on how developers can integrate Outlook and MOSS 2007 with Siebel and SAP. It integrates a variety of key MS technologies (e.g. BizTalk LOB adapters, WCF, VSTO, and so on) to help you understand how you can integrate LOB systems such as Siebel and SAP into your Office and SharePoint solutions. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/OBASampleApplicationKitforSAPSiebelRelea_D228/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="323" alt="image" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/OBASampleApplicationKitforSAPSiebelRelea_D228/image_thumb.png" width="507" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The actual developer kit can be found here: &lt;a title="http://code.msdn.microsoft.com/sapsiebel" href="http://code.msdn.microsoft.com/sapsiebel"&gt;http://code.msdn.microsoft.com/sapsiebel&lt;/a&gt;. And for more information on other OBA developer kits, you can go here: &lt;a title="http://msdn.microsoft.com/en-us/office/cc442491.aspx" href="http://msdn.microsoft.com/en-us/office/cc442491.aspx"&gt;http://msdn.microsoft.com/en-us/office/cc442491.aspx&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;Steve&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9709691" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/steve_fox/archive/tags/MOSS+platform/default.aspx">MOSS platform</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Office+platform/default.aspx">Office platform</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Office+Development/default.aspx">Office Development</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Office+Business+Applications/default.aspx">Office Business Applications</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/OBA+platform/default.aspx">OBA platform</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/OBAs/default.aspx">OBAs</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/OBA/default.aspx">OBA</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Outlook+Addin/default.aspx">Outlook Addin</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Outlook+OBA/default.aspx">Outlook OBA</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/OBA+Sample+Application+Kit/default.aspx">OBA Sample Application Kit</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Custom+Outlook+Form+Region/default.aspx">Custom Outlook Form Region</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Advanced+OBA/default.aspx">Advanced OBA</category></item><item><title>Silverlight, SharePoint, Services…Oh Yeah!!!</title><link>http://blogs.msdn.com/steve_fox/archive/2009/02/15/silverlight-sharepoint-services-oh-yeah.aspx</link><pubDate>Sun, 15 Feb 2009 05:05:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9423169</guid><dc:creator>Steve Fox</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/steve_fox/comments/9423169.aspx</comments><wfw:commentRss>http://blogs.msdn.com/steve_fox/commentrss.aspx?PostID=9423169</wfw:commentRss><description>&lt;p&gt;The last blog post I wrote was on interacting with SharePoint using services. One of the things that I’ve been quite involved in over the past year or so has been Silverlight and SharePoint integration. You will definitely see more of this type of development, so building off of my last post I decided to write a blog on consuming a web service with SharePoint.&lt;/p&gt;  &lt;p&gt;That said, this blog post will walk you through how to create a Web service that integrates with the SharePoint object model and then uses that service in a Silverlight application (which we’ll embed within SharePoint). It is an excerpt from a wider Silverlight and SharePoint 1-day training that I’ve been building at work (with the help of Advaiya). It also complements a book Paul Stubbs and I just wrote called “Professional SharePoint 2007 Development using Silverlight 2.” You can check this book out here: &lt;a title="http://www.amazon.com/Professional-Microsoft-SharePoint-Development-Silverlight/dp/0470434007/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234663767&amp;amp;sr=8-1" href="http://www.amazon.com/Professional-Microsoft-SharePoint-Development-Silverlight/dp/0470434007/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234663767&amp;amp;sr=8-1"&gt;http://www.amazon.com/Professional-Microsoft-SharePoint-Development-Silverlight/dp/0470434007/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234663767&amp;amp;sr=8-1&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I will cover WCF, Siverlight and SharePoint in a future blog post.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Your Environment&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Before you begin, make sure you’ve got the following environment set up: &lt;/p&gt;  &lt;p&gt;1.&amp;#160; Your web.config supports Silverlight. Check out the SIlverlight and SharePoint Blueprint (&lt;a title="http://www.codeplex.com/SL4SP" href="http://www.codeplex.com/SL4SP"&gt;http://www.codeplex.com/SL4SP&lt;/a&gt;) for more information as well as the recent MSDN article on this subject (&lt;a title="http://msdn.microsoft.com/en-us/magazine/dd148643.aspx" href="http://msdn.microsoft.com/en-us/magazine/dd148643.aspx"&gt;http://msdn.microsoft.com/en-us/magazine/dd148643.aspx&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;2. Windows Server 2003, 2008, Silverlight runtime, Silverlight Tools for VS 2008 SP 1, VS 2008 SP1, and VSeWSS 1.2.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Building the Service&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The first thing you need to do is build the Web service. The Web service will be an ASMX-based web service (i.e. ASP.NET). (We will cover WCF-based services and Silverlight later on in the workshop.) To create the service, open Visual Studio 2008. Select File, New Web Site and then select ASP.NET Web Service. Choose the File System as the location and then select the language (e.g. Visual C#) and provide a path for the project. Click OK. Figure 1 provides a screenshot of the New Web Site dialog.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image002_2.jpg"&gt;&lt;img title="clip_image002" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="334" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image002_thumb.jpg" width="519" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222388845"&gt;Figure &lt;/a&gt;1: New Web Site Dialog&lt;/p&gt;  &lt;p&gt;In Solution Explorer, change the names of the .asmx and .cs service files from the default Service.asmx and Service.cs (in the App_Code folder) to MyFirstSPService.asmx and MyFirstSPService.cs. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image004_2.jpg"&gt;&lt;img title="clip_image004" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="213" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image004_thumb.jpg" width="276" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 2: Renaming the Service Files&lt;/p&gt;  &lt;p&gt;You’ll also need to update the class references and statements in the newly named files. For example, in MyFirstSPService.asmx ensure you have the following code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;%@ WebService Language=&amp;quot;C#&amp;quot; CodeBehind=&amp;quot;~/App_Code/MyFirstSPService.cs&amp;quot; Class=&amp;quot;MyFirstSPService&amp;quot; %&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And in the MyFirstSPService.cs file, ensure you have the following code:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Collections.Generic;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Linq;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web.Services;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebService(Namespace = &amp;quot;http://tempuri.org/&amp;quot;)]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;// [System.Web.Script.Services.ScriptService]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public class MyFirstSPService : System.Web.Services.WebService&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public MyFirstSPService () {&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//Uncomment the following line if using designed components &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//InitializeComponent(); &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebMethod]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public string HelloWorld() {&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;return &amp;quot;Hello World&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To make sure that your solution compiles, hit F5 or select Debug, Start Debugging on the Visual Studio 2008 menu. You may be prompted with the dialog in Figure 3. If you are, click OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image006_2.jpg"&gt;&lt;img title="clip_image006" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="194" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image006_thumb.jpg" width="422" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222389566"&gt;Figure &lt;/a&gt;3: Debugging Not Enabled&lt;/p&gt;  &lt;p&gt;If your solution successfully compiles and debugs, you will be presented with the following debug screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image008_2.jpg"&gt;&lt;img title="clip_image008" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="369" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image008_thumb.jpg" width="470" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 4: Debug Screen&lt;/p&gt;  &lt;p&gt;In the debug screen, you will see a link at the top representing the one web method (HelloWorld) that is available within the service. Click the HelloWorld link and then to test the service click the Invoke button—which returns a string with the value: “Hello World.” See Figure 5. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image010_2.jpg"&gt;&lt;img title="clip_image010" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="226" alt="clip_image010" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image010_thumb.jpg" width="501" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222391550"&gt;Figure &lt;/a&gt;5: Invoking the Hello World Web Method&lt;/p&gt;  &lt;p&gt;Now that you’ve tested the default service that is created for you when you create a Web service, go back to the Visual Studio project and replace the HelloWorld web method code with the following web method:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebMethod]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public void useNormalMOSSApi(string SalesSPSite, string productName, string productNumber, string FY08Sales)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string strDashListRoot = SalesSPSite;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using (SPSite site = new SPSite(strDashListRoot))&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using (SPWeb web = site.OpenWeb())&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;web.AllowUnsafeUpdates = true;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPList list = web.Lists[&amp;quot;FY 09 Sales&amp;quot;];&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPListItem Item = list.Items.Add();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;Title&amp;quot;] = productName;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;ProductNum&amp;quot;] = productNumber;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;Sales&amp;quot;] = FY08Sales;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item.Update();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This code essentially enables you to set the context for a SharePoint web site and then add data to three different columns (Title, ProductNum and Sales) in a list called FY 09 Sales. &lt;/p&gt;  &lt;p&gt;When you add this code, you’ll get errors. This is because you need to add a reference to the Microsoft.SharePoint.dll. To do this, right-click the project name, select Add Reference and then select Windows SharePoint Services (as is shown in Figure 6) and click OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image012_2.jpg"&gt;&lt;img title="clip_image012" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="392" alt="clip_image012" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image012_thumb.jpg" width="465" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222392006"&gt;Figure &lt;/a&gt;6: Add Reference Dialog&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: In order for this service to work, you’d need to have created a custom list in SharePoint called “FY 09 Sales” with three columns of type Text called “Title,” “ProductNum,” and “Sales.” To do this, go to your SharePoint site and click View All Site Content at the root level site and then click Create. In the Custom Lists category, click Custom List. Make the Name “FY 09 Sales” and add a description to the Description field. When the list is created it will open by default. Click Settings and then select Create Column. Add each of the three aforementioned columns setting the type of information in the column to Single lines of text—see Figure 7. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image014_2.jpg"&gt;&lt;img title="clip_image014" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="286" alt="clip_image014" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image014_thumb.jpg" width="255" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222392293"&gt;Figure &lt;/a&gt;7: Setting the Column Type&lt;/p&gt;  &lt;p&gt;Getting back to the service, now that you’ve added the reference to the SharePoint DLL, add a using statement at the top of the class as follows:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using Microsoft.SharePoint;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The code errors should go away. The full MyFirstSPService.cs file should look like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Collections.Generic;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Linq;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web.Services;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using Microsoft.SharePoint;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebService(Namespace = &amp;quot;http://tempuri.org/&amp;quot;)]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;// [System.Web.Script.Services.ScriptService]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public class MyFirstSPService : System.Web.Services.WebService&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public MyFirstSPService () {&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//Uncomment the following line if using designed components &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//InitializeComponent(); &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[WebMethod]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public void useNormalMOSSApi(string SalesSPSite, string productName, string productNumber, string FY08Sales)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string strDashListRoot = SalesSPSite;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using (SPSite site = new SPSite(strDashListRoot))&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using (SPWeb web = site.OpenWeb())&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;web.AllowUnsafeUpdates = true;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPList list = web.Lists[&amp;quot;FY 09 Sales&amp;quot;];&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPListItem Item = list.Items.Add();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;Title&amp;quot;] = productName;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;ProductNum&amp;quot;] = productNumber;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item[&amp;quot;Sales&amp;quot;] = FY08Sales;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Item.Update();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To test this, build the web site solution. Hit F5 and then test out the web method.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: You must create the SharePoint list before you can successfully test out the service.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image016_2.jpg"&gt;&lt;img title="clip_image016" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="362" alt="clip_image016" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image016_thumb.jpg" width="506" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 8: Testing the Service Call&lt;/p&gt;  &lt;p&gt;If your service is successful, you should have a result similar to the following in your SharePoint list:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image018_2.jpg"&gt;&lt;img title="clip_image018" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="87" alt="clip_image018" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image018_thumb.jpg" width="501" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 9: Service Result in SharePoint&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Deploying the Service&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now that you’ve built the service, you need to deploy it. We’ll deploy it to IIS 7.0. If you’re using another version of IIS, the general process you’ll need to follow is to 1) Create a web site, 2) map the virtual path to the root web site path of the service, and 3) set permissions for the service. &lt;/p&gt;  &lt;p&gt;Open IIS and then expand the Connections until you see the web sites. Right-click Web Sites and select Add Web Site. Give the site a name, for example MyFirstSPServiceIISSite and then map the physical path of the service you just created to the IIS web site. See Figure 10. Assign an unused port. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: To test the service out on the local environment, click Test Settings. This will tell you if the service is reachable. If you do not get to successful tests, you’ll need to adjust the Connect as… settings. One way is to explicitly set the calling service with your (that is the local Windows credentials) to make sure the call will succeed. You then also need to go to the Authentication option in the Features view and set Windows Authentication to Enabled. In a production environment, you’ll need to use different settings—potentially having a user (e.g. IIS_User) for your service and enabling ASP.NET Authentication. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image020_2.jpg"&gt;&lt;img title="clip_image020" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="405" alt="clip_image020" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image020_thumb.jpg" width="419" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222393253"&gt;Figure &lt;/a&gt;10: Creating the IIS Site&lt;/p&gt;  &lt;p&gt;When you‘ve done this, click View, Refresh and then select MyFirstSPServiceIISSite in the Web Sites list and select Content View. You should see something similar to Figure 11. To make sure you’ll be able to &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image022_2.jpg"&gt;&lt;img title="clip_image022" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="350" alt="clip_image022" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image022_thumb.jpg" width="446" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222393561"&gt;Figure &lt;/a&gt;11: Content View of Web Site in IIS &lt;/p&gt;  &lt;p&gt;At this point, you’ll be able to right-click the MyFirstSPService.asmx file and select Browse. Test out the web method again to make sure you have another successful call in the service to the SharePoint site—see Figure 12. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image024_2.jpg"&gt;&lt;img title="clip_image024" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="90" alt="clip_image024" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image024_thumb.jpg" width="486" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222393763"&gt;Figure &lt;/a&gt;12: Second Successful Call&lt;/p&gt;  &lt;p&gt;While all the service testing at each step in the development process may seem monotonous, it is recommended as a good defensive programming practice. This way, if the service fails you have a better idea of where in the process it failed. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Building the Silverlight and SharePoint Application&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now that you’ve created the service, you can now create the client side application, which is the Silverlight application that will eventually be deployed to SharePoint. Let’s first create the Silverlight application. &lt;/p&gt;  &lt;p&gt;Open Visual Studio 2008 and create a new solution, using the Blank Solution template. To do this, click File, New Project, and then select the Visual Studio Solutions and Blank Solution template. Provide a name for your solution and then click OK. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image026_2.jpg"&gt;&lt;img title="clip_image026" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="296" alt="clip_image026" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image026_thumb.jpg" width="439" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 13: Creating a Blank Solution&lt;/p&gt;  &lt;p&gt;Right-click the solution and then select Add ,New Project, and then in the Project Types category select Silverlight. In the Templates category select Silverlight Application and provide a name for your application, for example SPSilverlightClient. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image028_2.jpg"&gt;&lt;img title="clip_image028" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="285" alt="clip_image028" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image028_thumb.jpg" width="445" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 14: New Silverlight Application&lt;/p&gt;  &lt;p&gt;When prompted, just select Automatically generate a test page… as the test environment for the Silverlight application. You do not need the full web site for this solution. Navigate to the Page.xaml file and add the following XAML code to create your Silverlight UI.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;UserControl x:Class=&amp;quot;SPSilverlightClient.Page&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;750&amp;quot; Height=&amp;quot;380&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Canvas x:Name=&amp;quot;LayoutRoot&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Canvas Width=&amp;quot;550&amp;quot; Height=&amp;quot;300&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Path Width=&amp;quot;550&amp;quot; Height=&amp;quot;300&amp;quot; Canvas.Left=&amp;quot;38&amp;quot; Canvas.Top=&amp;quot;9&amp;quot; Stretch=&amp;quot;Fill&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Data=&amp;quot;F1 M 42.336,8.86813L 257.336,8.86813C 259.545,8.86813 261.336,10.659 261.336,12.8681L 261.336,77.8681C 261.336,80.0773 259.545,81.8681 257.336,81.8681L 42.336,81.8681C 40.1269,81.8681 38.336,80.0773 38.336,77.8681L 38.336,12.8681C 38.336,10.659 40.1269,8.86813 42.336,8.86813 Z &amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Path.Fill&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;LinearGradientBrush StartPoint=&amp;quot;0.75,0.7&amp;quot; EndPoint=&amp;quot;0.75,-0.01&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;LinearGradientBrush.GradientStops&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;GradientStop Color=&amp;quot;Azure&amp;quot; Offset=&amp;quot;0&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;GradientStop Color=&amp;quot;#FFDCDCDC&amp;quot; Offset=&amp;quot;0.8&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;GradientStop Color=&amp;quot;#FFC3C3C3&amp;quot; Offset=&amp;quot;1&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/LinearGradientBrush.GradientStops&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/LinearGradientBrush&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/Path.Fill&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/Path&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/Canvas&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;15&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;18&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Sales Information for FY 09&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FFF3F3F3&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;51&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;16&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;18&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Sales Information for FY 09&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;!-- User entry form text and controls.--&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtBlckSites&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Available SharePoint Sites: &amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBox x:Name=&amp;quot;cmboBoxOfferings&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;210&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;20&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;290&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;DropDownClosed=&amp;quot;cmboBoxOfferings_DropDownClosed&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBoxItem x:Name=&amp;quot;optionOne&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtSPDev&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;http://stefoxdemo&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/TextBlock&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBoxItem&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBoxItem x:Name=&amp;quot;optionTwo&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtVSDev&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;http://sharepoint/sites/spotw&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/TextBlock&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBoxItem&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBoxItem x:Name=&amp;quot;OptionThree&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtSQLSRVDev&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;http://sharepoint/sites/sp14&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/TextBlock&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBoxItem&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBoxItem x:Name=&amp;quot;OptionFour&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtAdvSPDev&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;http://my/sites/stefox&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/TextBlock&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBoxItem&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;ComboBoxItem x:Name=&amp;quot;OptionFive&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtClientDev&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;http://sharepoint/sites/signup&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/TextBlock&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBoxItem&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/ComboBox&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;90&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Site Description: &amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock x:Name=&amp;quot;txtSiteDescr&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;210&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;90&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Description Here.&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;Black&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;290&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;TextWrapping=&amp;quot;Wrap&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;130&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Product Name: &amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBox x:Name=&amp;quot;txtProductName&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;25&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;200&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;210&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;125&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;170&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;Product Number: &amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBox x:Name=&amp;quot;txtProductNum&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;25&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;200&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;210&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;165&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBlock&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;50&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;215&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontFamily=&amp;quot;Trebuchet MS&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FontWeight=&amp;quot;Bold&amp;quot; FontSize=&amp;quot;12&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Text=&amp;quot;FY 09 Sales: &amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Foreground=&amp;quot;#FF666666&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;TextBox x:Name=&amp;quot;txtFY08Sales&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;25&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;200&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;210&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;210&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Button x:Name=&amp;quot;btnWebServiceCall&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;25&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;60&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Content=&amp;quot;Insert&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;125&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;260&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Click=&amp;quot;btnWebServiceCall_Click&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;Button x:Name=&amp;quot;btnFieldsClear&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Height=&amp;quot;25&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Width=&amp;quot;60&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Content=&amp;quot;Clear&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Left=&amp;quot;215&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Canvas.Top=&amp;quot;260&amp;quot;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Click=&amp;quot;btnFieldsClear_Click&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/Canvas&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/UserControl&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;When complete, your Silverlight client UI should similar to Figure 15. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image030_2.jpg"&gt;&lt;img title="clip_image030" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="357" alt="clip_image030" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image030_thumb.jpg" width="455" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222394487"&gt;Figure &lt;/a&gt;15: Silverlight Client&lt;/p&gt;  &lt;p&gt;Notice that there are a number of key events that are associated with some of the controls in the XAML code. These correspond to code-behind events in the Page.xaml.cs file. Before we jump to the code-behind, add a reference to the service you created earlier. To do this, right click References and select Add Service Reference. To get the service URL, you can go into your IIS view, right-click the ASMX file and select Browse. Copy and paste the URL from the browser to the Address field in the Add Service Reference dialog—see Figure 16. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image032_2.jpg"&gt;&lt;img title="clip_image032" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="373" alt="clip_image032" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image032_thumb.jpg" width="463" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222394812"&gt;Figure &lt;/a&gt;16: Adding a Service Reference&lt;/p&gt;  &lt;p&gt;With the service added to the Silverlight client application, you can now add the code-behind that maps to the Silverlight UI. &lt;/p&gt;  &lt;p&gt;The first thing you’ll need is four class-level variables, which represent the data that we’re going to pass to the web method in our service. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string productName = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string productNumber = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string FY08Sales = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string SalesSPSite = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Then, you’ll need to add the other logic, which in the code to follow includes an event from the Insert button in the Silverlight UI and some logic that maps to the Clear button. &lt;/p&gt;  &lt;p&gt;The web service call, which is triggered from the button, looks like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void btnWebServiceCall_Click(object sender, RoutedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;productName = txtProductName.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;productNumber = txtProductNum.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FY08Sales = txtFY08Sales.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPSilverlightClient.ASMXUpdateSPList.MyFirstSPServiceSoapClient proxy = new SPSilverlightClient.ASMXUpdateSPList.MyFirstSPServiceSoapClient();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.useNormalMOSSApiCompleted += new EventHandler&amp;lt;System.ComponentModel.AsyncCompletedEventArgs&amp;gt;(proxy_useNormalMOSSApiCompleted);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.useNormalMOSSApiAsync(SalesSPSite, productName, productNumber, FY08Sales);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.CloseAsync();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Note that Silverlight service calls are asynchronous, so you need to have a completed event, which in this application looks like the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;void proxy_useNormalMOSSApiCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;MessageBox.Show(&amp;quot;Can you believe it? This stuff actually works!&amp;quot;);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font face="tahoma" size="2"&gt;The code here obviously doesn’t do much other than issue a message to the user when the service call is complete. In production code, you would probably want to verify that there had been an update to the SharePoint list before issuing this type of message.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="tahoma" size="2"&gt;The btnFieldsClear_Click event, shown below, simply clears the user entries in the Silverlight UI.&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void btnFieldsClear_Click(object sender, RoutedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtFY08Sales.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtProductName.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtProductNum.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You may also notice that there is an event that corresponds to the closing of the drop-down box. This is essentially place-holder code, but in reality should grab the text property of the selected item within the combo box and assign that value to SalesSPSite. However, since I only have one site to demo, I hard-coded the variable to always be that site. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void cmboBoxOfferings_DropDownClosed(object sender, EventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//Be warned...lazy hard-coded variable data to follow.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;if (optionOne.IsSelected == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;FY 09 Sales Tracking Site&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (optionTwo.IsSelected == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;SharePoint on the Web Metrics&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionThree.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Wave 14 Reports&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionFour.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Personal Metrics&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionFive.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Signage Reports&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;};&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;If you were to look at the code-behind in its entirety, this is what it would look like:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Collections.Generic;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Linq;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Net;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Controls;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Documents;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Input;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Media;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Media.Animation;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Windows.Shapes;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;namespace SPSilverlightClient&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public partial class Page : UserControl&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string productName = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string productNumber = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string FY08Sales = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;string SalesSPSite = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public Page()&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;InitializeComponent();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void btnWebServiceCall_Click(object sender, RoutedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;productName = txtProductName.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;productNumber = txtProductNum.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;FY08Sales = txtFY08Sales.Text;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SPSilverlightClient.ASMXUpdateSPList.MyFirstSPServiceSoapClient proxy = new SPSilverlightClient.ASMXUpdateSPList.MyFirstSPServiceSoapClient();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.useNormalMOSSApiCompleted += new EventHandler&amp;lt;System.ComponentModel.AsyncCompletedEventArgs&amp;gt;(proxy_useNormalMOSSApiCompleted);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.useNormalMOSSApiAsync(SalesSPSite, productName, productNumber, FY08Sales);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;proxy.CloseAsync();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;void proxy_useNormalMOSSApiCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;MessageBox.Show(&amp;quot;Can you believe it? This stuff actually works!&amp;quot;);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void btnFieldsClear_Click(object sender, RoutedEventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtFY08Sales.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtProductName.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtProductNum.Text = &amp;quot;&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;private void cmboBoxOfferings_DropDownClosed(object sender, EventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;//Be warned...lazy hard-coded variable data to follow.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;if (optionOne.IsSelected == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;FY 09 Sales Tracking Site&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (optionTwo.IsSelected == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;SharePoint on the Web Metrics&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionThree.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Wave 14 Reports&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionFour.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Personal Metrics&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;else if (OptionFive.IsEnabled == true)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;txtSiteDescr.Text = &amp;quot;Signage Reports&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;SalesSPSite = &amp;quot;http://stefoxdemo&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;};&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At this point, you are now done building the Silverlight UI. Let’s move on to the final part: building the SharePoint web part. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Building the SharePoint Web Part Host Container&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The SharePoint web part will serve as the object within SharePoint that will simply put host your Silverlight application. There are a number of ways to do this, of which this is one. &lt;/p&gt;  &lt;p&gt;Open the solution file (where you created your Silverlight application) and then right-click the solution and select Add, and New Project. Select the SharePoint project type and then select Web Part. Provide a name for your Web Part project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image034_2.jpg"&gt;&lt;img title="clip_image034" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="293" alt="clip_image034" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image034_thumb.jpg" width="458" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 17: Adding SharePoint Web Part&lt;/p&gt;  &lt;p&gt;When your project is created, right click References and select Add Reference. Add the System.Web.Extensions DLL and System.Web.Silverlight DLL and click OK. See Figure 18&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image036_2.jpg"&gt;&lt;img title="clip_image036" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="336" alt="clip_image036" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image036_thumb.jpg" width="399" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a name="_Ref222396028"&gt;Figure &lt;/a&gt;18: Adding Silverlight References&lt;/p&gt;  &lt;p&gt;In the WebPart1.cs file (I removed and re-added a new Web Part item and called mine MyFirstSPServiceCall), you’ll need to have the following code. This checks for a ScriptManager object and also sets some properties for the Silverlight control we’ll add to the Controls collection.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;protected override void OnLoad(EventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;base.OnLoad(e);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ScriptManager sm = ScriptManager.GetCurrent(this.Page);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;if (sm == null)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;sm = new ScriptManager();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Controls.AddAt(0, sm);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;protected override void CreateChildControls()&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;base.CreateChildControls();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;System.Web.UI.SilverlightControls.Silverlight ctrl = new System.Web.UI.SilverlightControls.Silverlight();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.ID = &amp;quot;InsertSPListItem&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Source = &amp;quot;http://stefoxdemo/XAPS1/SPListClient.xap&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Width = new Unit(650);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Height = new Unit(400);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Controls.Add(ctrl);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You can edit the XML properties of your web part through the WSP View. For example, the following XML is from the .webpart XML file. You can see I’ve updated the name and description of the web part with something a little more intuitive.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;webParts&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;webPart xmlns=&amp;quot;http://schemas.microsoft.com/WebPart/v3&amp;quot;&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;metaData&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;!--&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;The following Guid is used as a reference to the web part class, &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;and it will be automatically replaced with actual type name at deployment time.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;--&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;type name=&amp;quot;967945ef-8baa-406e-bda3-fe4b836b2f66&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;importErrorMessage&amp;gt;Cannot import MyFirstSPServiceCall Web Part.&amp;lt;/importErrorMessage&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/metaData&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;data&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;properties&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;property name=&amp;quot;Title&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;My First SharePoint Service Call Web Part&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;property name=&amp;quot;Description&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;A web part that hosts a call into SharePoint to update a list.&amp;lt;/property&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/properties&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/data&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/webPart&amp;gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;lt;/webParts&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Jumping back to the code for the actual web part, the complete code that you’ll need to have in the webpart.cs file (in my case MyFirstSPServiceCall.cs) is as follows: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Runtime.InteropServices;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web.UI;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web.UI.WebControls;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Web.UI.WebControls.WebParts;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System.Xml.Serialization;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using Microsoft.SharePoint;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using Microsoft.SharePoint.WebControls;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using Microsoft.SharePoint.WebPartPages;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;namespace SPSilverlightSPWP&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;[Guid(&amp;quot;967945ef-8baa-406e-bda3-fe4b836b2f66&amp;quot;)]&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public class MyFirstSPServiceCall : System.Web.UI.WebControls.WebParts.WebPart&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;public MyFirstSPServiceCall()&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;protected override void OnLoad(EventArgs e)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;base.OnLoad(e);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ScriptManager sm = ScriptManager.GetCurrent(this.Page);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;if (sm == null)&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;sm = new ScriptManager();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Controls.AddAt(0, sm);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;protected override void CreateChildControls()&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;{&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;base.CreateChildControls();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;System.Web.UI.SilverlightControls.Silverlight ctrl = new System.Web.UI.SilverlightControls.Silverlight();&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.ID = &amp;quot;InsertSPListItem&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Source = &amp;quot;http://stefoxdemo/XAPS1/SPListClient.xap&amp;quot;;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Width = new Unit(650);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;ctrl.Height = new Unit(400);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;Controls.Add(ctrl);&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;At this point, you need to ensure the Debug property in your SharePoint project properties is set to your &lt;a href="http://localhost"&gt;http://localhost&lt;/a&gt; (or the correct server to which you’re deploying the web part), and you can deploy the web part. &lt;/p&gt;  &lt;p&gt;If you notice in the source property code of the Silverlight application, it references an absolute URL on a test server. This presupposes two things: 1) you’ve created a document library called XAPS1 and 2) you’ve added the XAP file (the compiled Silverlight application) into that document library. If you have not, then you will simply get a blank, white web part. Also, note that this is not the only way to do this. In &lt;i&gt;Professional SharePoint 2007 Development using Silverlight 2&lt;/i&gt;, there are a number of ways to deploy the web part that are discussed. &lt;/p&gt;  &lt;p&gt;To deploy the web part, right-click the SharePoint project and select Deploy. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Testing the Web Part&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now that you’ve deployed the web part, you can now open your SharePoint server and add the new Silverlight web part to your SharePoint site. To do this, click Site Actions and Edit Page. Click Add a Web and then select your newly deployed web part from the Web gallery. Once you’ve added the web part, you can now interact with the Silverlight UI within SharePoint that further interacts with your SharePoint list (i.e. that SharePoint object model). &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image038_2.jpg"&gt;&lt;img title="clip_image038" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="345" alt="clip_image038" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image038_thumb.jpg" width="506" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 19: Silverlight Web Part in SharePoint&lt;/p&gt;  &lt;p&gt;When you click Insert, a new record will be added to the SharePoint list and a message will be issued, as coded in our Silverlight UI, to the user.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image040_2.jpg"&gt;&lt;img title="clip_image040" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="280" alt="clip_image040" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image040_thumb.jpg" width="505" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 20: Message Indicating Success&lt;/p&gt;  &lt;p&gt;Of course the success message is only one indication. To verify that a new record was indeed added to the FY 09 Sales , navigate to the list and verify the new information on the list. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image042_2.jpg"&gt;&lt;img title="clip_image042" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="87" alt="clip_image042" src="http://blogs.msdn.com/blogfiles/steve_fox/WindowsLiveWriter/0e6f762ad145_FE01/clip_image042_thumb.jpg" width="478" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Figure 21: Successful Addition of Record&lt;/p&gt;  &lt;p&gt;For more information on how to integrate Silverlight and SharePoint, check out &lt;i&gt;Professional SharePoint 2007 Development using Silverlight 2&lt;/i&gt; and &lt;a href="http://mssharepointdeveloper.com"&gt;http://mssharepointdeveloper.com&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9423169" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/steve_fox/archive/tags/MOSS+platform/default.aspx">MOSS platform</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/SharePoint+development/default.aspx">SharePoint development</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/MSDN/default.aspx">MSDN</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Silverlight+and+SharePoint/default.aspx">Silverlight and SharePoint</category><category domain="http://blogs.msdn.com/steve_fox/archive/tags/Advanced+OBA/default.aspx">Advanced OBA</category></item></channel></rss>