Methods | This Package | All Packages

HTMLControl Class

Encapsulates the HTML control.

WebBrowser
  |
  +--HTMLControl

package com.ms.wfc.ui

public class HTMLControl
extends
WebBrowser

Remarks

The HTML control makes it possible to retrieve Web pages and to parse their contents. Typically, after drawing the control on a form, you call the HTMLControl class' setURL method to associate a URL with the control. This URL can be a reference to an HTML page, or it can be the path to a Common Gateway Interface (CGI) script, or Active Server Page (ASP), and can include the arguments to an HTTP post.

For example, the following code sets the URL in the control to Microsoft's Web site:

HTMLControl1.setURL("http://www.microsoft.com");

The following example sets the URL and posts arguments to that URL:

HTMLControl1.setURL("http://www.myguestbook.com/guestbook.asp?FirstName=Joe&LastName=Smith");

Calling the setURL method results in the display of the page within the control. Once the page is loaded, the control's documentReady event is triggered. From within the event handler for this event, you can call HTMLControl.getDocument to retrieve a DhDocument object that represents the control's contents, and you can use the methods supported by the DhDocument object to manipulate the control's contents.