|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
Browser Capabilities ComponentThe Browser Capabilities Component enables you to detect the type of client browser accessing your Web site. To create an instance of the Browser Capabilities Component, you use the Server objects CreateObject method. The following code shows an example of creating an instance of the Browser Capabilities Component: Set bc=Server.CreateObject(MSWC.BrowserType) You can use the Browser Capabilities Component along with the Browscap.ini file to determine the type of browser and its capabilities. The Browscap.ini file will contain information about the different industry-standard browsers. If the client browser does not support ActiveX controls, for example, you can decide to send alternate content to that browser instead of an ActiveX control. By using the Browser Capabilities Component, you can design your Web site irrespective of the browser the visitors to your site will use. This way, your target audience will not be limited by the type of browser. Once instantiated, a Browser Capabilities object has properties whose values tell you what the target browser is able to process. The key properties of a Browser Capabilities object are outlined in Table 33.17.
Developing ASP Applications with Visual InterDevVisual InterDev is a Web programming tool for the advanced Web programmer and developer. Visual InterDev provides an integrated, visual development environment that includes all the tools you need to design and develop dynamic, data-driven Web applications. By using Visual InterDev, you can build Active Server Pages applications that incorporate server-side scripts, and access via ODBC to database formats such as Microsoft SQL Server, Oracle, and Informix, site management, and reusable server components. Visual InterDev also enables you to integrate components such as Java applets, ActiveX controls, Active Server components, COM objects, and so on within your HTML and ASP pages. Furthermore, you can integrate third-party components. You have access to a powerful set of tools within Visual InterDev that you can use to make your Web application data-aware and data-driven. Visual InterDevs main database components include the following:
Visual InterDev supports both standard and design-time ActiveX controls. The design-time ActiveX controls will automatically generate the client-side or server-side scripts for your application. In addition, they can also generate the HTML content you can view by using any browser on any platform. Just as you can integrate Visual SourceSafe with your Visual C++ and Visual Basic development environment, you can also integrate Visual SourceSafe with your Visual InterDev development environment to enable team development and version control. Besides the tightly integrated database component, Visual InterDev also includes a version of FrontPage WYSIWYG HTML Editor, Microsoft Image Composer, which you can use to create, edit, and manipulate all kinds of images, and Microsoft Music Producer to integrate sounds into your Web pages. Visual InterDev also includes a Media Manager you can use to track your multimedia resources, such as sound clips, video clips, and images. Putting It All Together: A Simple ASP ApplicationIn the first part of this chapter, you read about VBScript In the first and how you could use it to create client-side scripts. Then, you learned quite a bit about Active Server Page applications and some of the built-in objects and components that support ASP development. Now it is time to join these two bodies of knowledge by looking at a short ASP application developed in VBScript. Suppose your company is running a Web-based marketing campaign. You have sent mailers to your clients assigning a unique promotional identifier to each one and inviting them to check out the promotion on your site. At your site, you will verify their contact information, ask them a few marketing questions, and then thank them for their participation. A back-end data source named promotion holds the current contact information and promotion IDs for each of your clients. To begin the application, you need prompt your client for his or her promotion ID. A simple HTML form will suffice for this. Whats unique in this case is that the ACTION attribute of the <FORM> tag will point to the ASP file promo1.asp and not at a CGI program. Listing 33.7 shows one possible way to code the form.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |