Sdílet prostřednictvím


Device Adapter Code

To help you create adapters for new mobile devices, or to create your own modifications for the XHTML adapter set, you can download the source code for the adapter from the ASP.NET Mobile Controls XHTML Adapter Source page on the Microsoft Download Center.

The adapter code can be compiled into its own assembly. You can compile the adapter code by running the following command in the directory that contains the device adapter code. The example assumes that the csc command is in your computer's PATH environment variable.

csc /target:library
   /out:System.Web.UI.MobileControls.ShippedAdapterSource.dll
   /r:System.Web.Mobile.dll
   /debug+
   /D:COMPILING_FOR_SHIPPED_SOURCE
   /nowarn:0679
   *.cs 

To use the custom adapter, update the <mobileControls> section in the root Web.config file. For more information, see <mobileControls> Element (ASP.NET Settings Schema)