Professional ASP.NET 1.0 Special Edition- P41

Professional Special Edition- P41:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | cfilter with versionString match browserMajorVersion w browserMinorVersion . w . majorVersion browserMajorVersion minorVersion browserMinorVersion c filter mobileDeviceModel 7110 optimumPageWeight 800 screenCharactersWidth 22 screenCharactersHeight 4 screenPixelsWidth 96 screenPixelsHeight 44 c case Here the match attributes are compared with the HTTP_USER_AGENT header to identify the device and set the capabilities accordingly. The important thing to realize here is that this is an extensible system. There are plenty of devices already in this file but we can add our own perhaps including the capabilities of the browser built into your fridge or whatever. We could even add devices that support some odd proprietary format should we wish to. Once these device capabilities have been set we have access to them from our code in two ways. The simplest is through the class. This class has a number of properties that relate to device characteristics such as the number of characters that can fit in a screen row whether color is supported and what markup language is preferred. Choice elements can access these properties via their capability attribute which is how we chose the preferred markup type earlier. We were actually testing for the value of the preferredRenderingType property of the MobileCapabilities object containing information about the current browser. We can also access these capabilities programmatically. The following code outputs the value of preferredRenderingType to the screen mobile Form runat server id first OnActivate firstactivate mobile Label runat server id devCaps mobile Form script runat server Public Sub first_activate o As Object e As EventArgs preferredRenderingType End Sub script resulting in and Using this method we can make dynamic choices in our code based on device capabilities. The other method is the one we briefly saw earlier involving setting up filters and .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
3    66    2    13-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.