次の方法で共有


ASP.NET Controls in Silverlight 3

This post provides quick steps to use the ASP.NET controls for Silverlight with Silverlight 3.

(This information relates to Silverlight 3 and ASP.NET)

The two ASP.NET Controls for Silverlight (the MediaPlayer control and the Silverlight control) were removed from the Silverlight 3 SDK. There are alternative ways to get the functionality that these controls provided in Silverlight 3, but if you wish to continue using these ASP.NET controls in Silverlight 3, one quick method is to add the System.Web.Silverlight.dll to the Bin directory of your Web site project in Visual Studio.

Here are the steps to find and add the System.Web.Silverlight.dll to your Web site.

1. Download the source code and assembly from the MSDN Code Gallery Web site.
https://go.microsoft.com/fwlink/?LinkId=156721

The samples contained in this download include source code and assembly for the MediaPlayer control and the Silverlight control that were shipped with the Silverlight 2 SDK.

 

2. Open an existing or new Web site in Visual Studio.

3. Create a Bin directory at the root of the project by right-clicking the project name in the Solution Explorer, selecting Add ASP.NET Folder and selecting Bin.

 

4. Right-click the Solution Explorer and select Open Folder in Windows Explorer so that you can copy the System.Web.Silverlight.dll to your current Web site project directory.

5. Copy the unzipped System.Web.Silverlight.dll file that you downloaded in Step 1 to the Bin folder of your Web site project.

6. Refresh your project in the Solution Explorer by clicking the refresh button .

7. Run your project on a machine that includes an install of Silverlight 3. 

 

For more information, see the whitepaper titled ASP.NET Server Controls for Silverlight in the Silverlight 3 SDK on the whitepaper section of the Silverlight.NET site .

 

-- Erik Reitan

ASP.NET User Education

This posting is provided "AS IS" with no warranties, and confers no rights.