Visual Basic Concepts

A History of Development on the Internet

Visual Basic programming technology represents a new set of approaches to Web technology, focused on the Visual Basic developer. This section offers a brief history of the Web's evolution from linked static content to the dynamic, compiled environment of Visual Basic Internet applications.

Static Content

The first applications on the Internet consisted of static pages that delivered their content to the browser and did not react dynamically to any actions the user performed. Although this model provides ready access to nicely formatted pages of information for your employees or potential customers, it provides limited interaction between the user and the Web server — and the static pages have to be manually edited to update their content.

Dynamic Content through Gateway Programming

The development of gateway interfaces such as Common Gateway Interface (CGI), Internet Server Application Programming Interface (ISAPI), and others allowed users to add dynamic content to the Web. With dynamic content, a browser can send a request for information. The server, instead of returning a static page, runs a script or application and returns HTML that reflects up-to-date, accurate information.

The disadvantage of gateway programs is that they are difficult to create and change. Gateway programs are not integrated into HTML files; in fact, they require an entirely different design process than do HTML files. In addition, all processing in a gateway program happens entirely on the server. This can increase server load and lead to backlogs in processing.


Scripting enables dynamic content by embedding executable scripts directly in an HTML page. Rather than querying the server for an executable, the browser can process scripts as it loads the HTML page. These scripts can be processed on either the client or the Web server. The most common languages for client-side scripting are VBScript and JavaScript. A common framework used for server-side scripting is called Active Server Pages, or ASP.

In the ASP scripting model, HTML development and scripting development are part of the same process. This translates into tangible benefits, enabling Web providers to provide interactive business applications rather than merely publishing content. For example, a travel agency can go beyond just publishing flight schedules; it can use ASP scripting to enable customers to check available flights, compare fares, and reserve a seat on a flight.

With ASP scripting, you can use any scripting language for which an appropriate scripting engine is available. ASP supplies scripting engines for Microsoft Visual Basic Scripting Edition (VBScript) and Microsoft JScript. You can incorporate sophisticated functionality using ActiveX components to process data and generate useful information.

Visual Basic Internet Applications

Visual Basic Internet technology takes the process one step further by allowing you to link standard Visual Basic code to a user interface of HTML pages. This provides an extremely powerful mechanism for associating programming functionality with your Web pages, while allowing you to create dynamic, interactive content. With Visual Basic Internet technology, you can perform complex business operations while avoiding some of the intricacies of gateway programming or scripting. You can also enjoy all the benefits of working in Visual Basic, such as using class modules, controls, and designers, and debugging your code.

There are two main types of Visual Basic Internet applications: IIS applications and DHTML applications:

  • IIS applications, named for Microsoft Internet Information Server, reside on a Web server and are used to process incoming requests from a browser. IIS applications process the requests, run associated Visual Basic code, and return responses to the user. All processing for an IIS application happens on the server.

  • DHTML applications, named for , let you write Visual Basic code that handles events on any element of an HTML page. Most processing in a DHTML application can happen on the browser computer, although the application can make calls to the server if necessary.

DHTML applications require the end user to have Microsoft Internet Explorer version 4.0 or later, while IIS applications are browser- and operating system—independent to the end user. Because of this, IIS applications are the appropriate choice when you want to develop an application that reaches a broad audience. DHTML applications may be the more appropriate choice for intranet applications or applications that need to support remote or offline usage.

There are also other types of applications you can create in Visual Basic that make use of the Internet. For example, you can create ActiveX components that can be used on the Internet. These include ActiveX controls that can be used on Web pages, ActiveX documents that can run in a browser, and ActiveX code components that can be deployed on a Web server for behind-the-scenes processing. In addition, you can use the WebBrowser control to use HTML pages within a forms-based application.

For More Information   See "Other Internet Technologies in Visual Basic" for more information on incorporating ActiveX components into your Internet applications. For information on using the WebBrowser control, see the Internet/Intranet/Extranet Services SDK on the MSDN Library CD, under the heading "SDK Documentation."