WebItem 類別

定義

警告

此 API 現已淘汰。

讓已升級的 Visual Basic 6.0 WebClass 專案能在 ASP.NET 中執行。Enables upgraded Visual Basic 6.0 WebClass projects to run in ASP.NET.

public ref class WebItem
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. https://go.microsoft.com/fwlink/?linkid=160862")]
public class WebItem
type WebItem = class
Public Class WebItem
繼承
WebItem
屬性

備註

當 Visual Basic 6.0 WebClass 專案升級為 Visual Basic 時,會將它轉換成 ASP.NETASP.NET 網站專案。When a Visual Basic 6.0 WebClass project is upgraded to Visual Basic, it is converted to an ASP.NETASP.NET Web site project.

宣告會加入至您的專案:一個用於 WebClass,另一個用於 WebClass 專案中的每個 WebItemsTemplatesDeclarations are added to your project: one for the WebClass and one for each of the WebItems and Templates in the WebClass project. Page_Load 事件程式會加入至專案,並先建立 WebClass 物件,然後 WebItemTemplates 6.0 Visual Basic 專案相關聯之每個 WebItemsWebClass 的物件。A Page_Load event procedure is added to the project, creating first a WebClass object and then WebItem objects for each of the WebItems and Templates associated with the Visual Basic 6.0 WebClass project. 最後,在 Page_Load 事件程式中,您會看到 WebClass 相容性執行時間的呼叫: ProcessEventsFinally, in the Page_Load event procedure, you will see a call to the WebClass Compatibility runtime: ProcessEvents. 這可讓執行時間呈現要求 URL 中指定的 WebItemThis enables the runtime to render the WebItem specified in the Request URL. 這段程式碼是新增至升級專案的唯一新程式碼,而且只會模擬 Visual Basic 6.0 WebClass 執行時間的基礎行為。This code is the only new code added to your upgraded project and only serves to emulate the underlying behavior of the Visual Basic 6.0 WebClass runtime.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic 2008。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. 在大多數情況下,這些函式和物件會複製在 .NET Framework 其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

建構函式

WebItem(String, WebClass, String)

初始化 WebItem 類別的新執行個體。Initializes a new instance of the WebItem class.

屬性

Name

取得程式碼中用來識別 WebItem 物件的名稱。Gets the name that is used in code to identify a WebItem object.

ReScanReplacements

取得或設定值,這個值決定是否要重新掃描取代文字中包含的語彙基元 (Token)。Gets or sets a value that determines whether to rescan for tokens that are contained within replacement text.

TagPrefix

取得或設定字串,這個字串用來做為 HTML 範本中取代標記名稱的前置詞。Gets or sets the string that is used to prefix replacement tag names in an HTML template.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
WriteTemplate(HttpResponse, String)

處理附加至 WebItem 物件的 HTML 範本,並將它傳回至瀏覽器。Processes an HTML template attached to a WebItem object and returns it to the browser.

適用於