Get your homepage to support a variety of browsing devices (asp+) (Part One)

Source: Internet
Author: User
Tags format html page interface range what is asp
Mobile control of Asp+
If media news and advertising are to be believed, we will be using small phones or other mobile devices to access the Internet in the near future. OK, this one
is a more optimistic estimate, but one thing is certain that visitors to your site already have a lot of people who are not using traditional browsers
, and the number is still increasing (SINA news: According to statistics, the global mobile phone users have exceeded computer users, and 30% of mobile phones with WAP work
Can). To accommodate a variety of mobile phones (including those that are small), Asp+ offers a proud service control to produce WML, rather than
Html. In this article, we will take a small look at the control that Microsoft is still developing. This article will also consider a number of other users browsing
equipment, such as a top box, or even a refrigerator (haha, is not feeling some days night pool).

Getting Started with asp+
There are a number of ways to create dynamic pages. In the past, the most prominent technique was to use executable programs to visit Common Cateway interface (CGI)
Ask the Web server. However, in recent years, new technologies have enabled scripting code to be written directly into HTML pages, and these technologies are becoming increasingly popular.
In these technologies are Perl,java server Page (JSP) and Microsoft's Active Server Pages (ASP).

The ASP begins with a DLL that can access the Web server through the Internet Server Application Programming Interface (ISAPI), in other words
This is an ISAPI DLL. This interface provides a fast and reliable connection to the server. The code is shipped in the same process or memory space
Yes. With this technology, the ASP evolves to 3.0 and is installed as part of Windows 2000.

Into the. NET World (the new concept that Microsoft brings to us)
Based on the introduction of Microsoft. NET Frameword, the design of the underlying ASP has changed. This new structure is completely disconnected from the language in which the current program is running and the operation
SYSTEM specifies the constraints of the structure.

Today, most programming languages can direct the native code (which has been executed in the process, commonly said to be the compiler) to compile the original code.
Therefore, this compilation must depend on the type of processor. For example, code compiled on an Intel processor will not run on a Motorala processor.

One exception to this is Java, which uses a separate virtural machine to execute code that is based on the specified processor and
As a system to compile. As long as there is a suitable Java Virtual Machine on the target, the code can be executed.

Microsoft's. NET framework is a much more extensive framework that is very similar to Java. It provides a complete development and operating environment, it can transport
Line program. The code is compiled into a special intermediate Language (IL). All the source code is compiled into IL code without regard to the Code
In the language.

Because of the code whether VB, VC, JScript or New C #, will be compiled into the same IL code. These compilers have been used as. NET
A part of the framework is contained.



The asp+ Framework

To combine ASP technology with the. NET Framework, Microsoft has developed a development system to provide a faster dynamic web development. At the same time, the operating environment will become more
Added efficiency, upgrade also has a great improvement. This technique is called active Server page+ or simply called asp+

How does the asp+ work?
The main new feature of asp+ is the combination of application and page event modules. Asp+ is part of this new code processing environment. This means that the new technology can
Reacting to events, such as the loading of a page or the start of an application, these asp+ can be handled through events.

The structure of this background execution can be very useful for the page. Generally this page includes a
tags and some other HTML elements, but these elements are executed on a server that has a asp+ environment. Asp+ not only to the browser (client) output is required
HTML and added some extra stuff inside to maintain the value of each control (used to back to the server), and that's a strange concept, but we have to
Accept AH. Just like we accept the ASP.

And because asp+ controls the way the page behaves through additional code and attributes, asp+ can do more fun things. Because the page is created on the server
Built, the asp+ engine is able to detect how the form was submitted, which means that it detects which button buttons the user is pressing.

asp+ allows server-side events to be used (this is a new concept). We'll see in the example below to handle the problem with the specified event.

This special HTML element request is the foundation of this new background structure, and its real name is asp+ Server Controls (asp+ service control). In the standard asp+
There are many kinds of such controls. You can use VB or other. NET support languages to write, inherit, and extend this control.

What is asp+ mobile control?
A big concern for Web developers now is the rapidly growing market for mobile devices. There are hundreds of different types of devices that are now available, and these produce
None of the products can be compatible with a browser on a traditional PC. This range includes, but is not limited to, wireless devices. The same is true for handheld computers, as well as our
TV and game consoles, which are now available online.

Most of these devices are not HTML and also do not support changes in colors, fonts, positioning, sounds, and various other elements. Therefore, create one for your site
HTML page, and does not solve all the problems. So we have to create a page that can be displayed for most devices. (Hey, think about it, if a
Device to write a page, that you .... )

To provide this attribute, Microsoft introduced a mobile control, which can create different pages based on different devices. If it is WAP mobile browsing,
He would create the WML code, and if it was the handheld, it would create the HTML code, and the traditional browsers such as IE would not say.

The focus of this control is the ability to intelligently create different outputs, while you use the same code for different devices. For example, list control will be in the mobile phone, handheld power
The same list menu is displayed on the brain and on the PC, but the code they use to display the output is different.

With him, programmers can develop programs without thinking about the devices that customers use.

What can mobile control do?
Now let's look at what mobile controls can do:

Range of mobile controls
The following properties are valid for the current version of the move control:

MobilePage like the deck in WML
Panel as a card in WML
Form enables user Input control
Label prints text on a page
Command to create a link
TextBox text Input Box
List as Select
RequiredFieldValidator to check user input
RegularExpressionValidator use user input to take effect
Stylesheet Specify output format
There is also a SelectionList control in later releases, which is roughly the same as the list.

Set this component
Creating a mobile control is simple, although these specific technologies have been changing, but these controls are still a DLL file that copies him to the development environment directory
Bin subdirectory. Of course, this application must also be a virtual directory.

The second step is to add the example file Config.web to the application directory, if the file already exists, then add the contents of this section of the document. It through
Over Browsercapabilities control to determine which format and language will be sent to the user side.

In the current release, mobile controls only support WML on WAP phones, as well as HTML. Later versions will support a lot. Like Xhtml,hdml,chtl and so on.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.