TAILIEUCHUNG - ASP.NET 4 Unleased - p 27

Using the Rich Controls throw new Error(errMsg); } Listing displays a simple web page with a Silverlight control. The file is located in the same folder as our web page, as the source tag indicates. The background of the | 234 CHAPTER 4 Using the Rich Controls throw new Error errMsg script head body object id SilverlightContent width 400 height 300 data data application x-silverlight-2 type application x-silverlight-2 param name source value param name onerror value onSilverlightError param name background value black param name minRuntimeVersion value param name autoUpgrade value true a href http fwlink LinkID 149156 style text-decoration none img src http fwlink LinkId 108181 alt Get Microsoft Silverlight style border-style none a object body html Listing displays a simple web page with a Silverlight control. The file is located in the same folder as our web page as the source tag indicates. The background of the control is set to black and we require a minimum version of Silverlight 3. If a user visits this page and has only Silverlight 1 or 2 installed they are automatically prompted to upgrade to the newer version. The a and img HTML tags toward the bottom of the object display only if the user does not have the Silverlight runtime installed and shows the default Get Microsoft Silverlight installation button. Summary This chapter tackled the rich controls. You learned how to perform file uploads with the FileUpload control. You also saw how to accept and display large file uploads by dividing the file into smaller chunks. You also learned how to use the Calendar control to display a date picker and render a schedule of events. Using a tiny bit of JavaScript you learned how to create a fancy popup date picker. This chapter also discussed the AdRotator control. You learned how to store a list of advertisements in both an XML file and a database table. You also learned how to track advertisement impressions and transfers and build a statistics page. From the Library of Wow eBook Summary 235 You also learned how to use the MultiView control to display different views of a page.