PRB: Do Not Use a WebClass ProcessTag Inside an HTML Tag (192035)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q192035

SYMPTOMS

A WebClass page does not display in the browser or is not displayed as expected.

CAUSE

You cannot use WebClass ProcessTags within an HTML tag because the design- time parser does not interpret it correctly.

RESOLUTION

The workaround is to use a WebClass ProcessTag for the entire HTML tag or do not put ProcessTags inside HTML tags.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Notice in the code below from a HTML page that there is a WebClass ProcessTag called <WC@Replace> with an ending </WC@Replace> located within an HTML INPUT tag. This will not work because you have WebClass ProcessTag inside a HTML tag.
   <INPUT id="ReplaceField" NAME="ReplaceField" SIZE=39 MAXLENGTH=50 value=
   "<WC@Replace>sss</WC@Replace>">
				

Workaround

  1. Place your WebClass ProcessTag within the HTML page, but not inside of a HTML Tag. For example:
          <HTML>
          <BODY>
          <WC@Replace>sss</WC@Replace>
          </BODY>
          <HTML>
    
    					
  2. Write code to process the ProcessTag in your WebClass ProcessTag procedure. Here is some sample code:
          Private Sub Template3_ProcessTag(ByVal TagName As String, _
                                   TagContents As String, SendTags As Boolean)
            TagContents = "<INPUT id=ReplaceField NAME=ReplaceField SIZE=39 _
                                   MAXLENGTH=50 value=sss>"
          End Sub
    
    					

REFERENCES

For additional information on WebClasses, see the following article in the Microsoft Knowledge Base:

189539 INFO: VB 6.0 Readme - Part 8 - WebClass Designer Issues

A WebClass sample will be located at the following location when you install the MSDN samples:

Microsoft Visual Studio\MSDN98\98VS\1033\Samples\VB98\WcDemo\WcDemo.vbp


Modification Type:MajorLast Reviewed:4/25/2001
Keywords:kbDSupport kbprb kbWebClasses KB192035