Private Sub WebClass_Start()
Set NextItem = Template1
End Sub
註:NextItem is used to shift processing from one WebItem to another during a single request. Using the NextItem will cause the Private Sub Template1_Respond() to fire.
Private Sub Template1_Respond()
Template1.WriteTemplate
End Sub
註:The Template1.WriteTemplate will send the contents of Template1 to client browser window. Remember that Template1 is the HTML file you imported into the IIS application. If you don't put anything in this event and you run the project, the browser will come up with a blank page.
按 F5 執行此程式
PS.
若您有安裝MSDN的samples,您可參考此範例 Microsoft Visual Studio\MSDN98\98VS\1033\Samples\VB98\WcDemo\WCDEMO.VBP
為了您的專案有較佳的performance ,建議您可設定專案屬性=>核取「執行時無使用者介面」,「保留於記憶體中」及"執行緒模型"選擇「公寓模型執行緒」。