WebClass 類別

定義

警告

此 API 現已淘汰。

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

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

備註

當 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 專案中的每個 WebItemTemplateDeclarations are added to your project: one for the WebClass and one for each WebItem and Template in the WebClass project. Page_Load 事件程式會加入至專案。A Page_Load event procedure is added to the project. 這會先建立一個 WebClass 物件,然後 WebItem 與 Visual Basic 6.0 WebClass 專案相關聯之每個 WebItemTemplate 的物件。This creates first a WebClass object and then WebItem objects for each WebItem and Template 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 serves only 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.

建構函式

WebClass(String, String, Object)

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

屬性

Name

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

NextItem

取得或設定目前 WebItem 物件中的另一個 WebClass 物件。Gets or sets another WebItem object in the current WebClass object.

UrlData

取得或設定參數,這個參數會附加至任何使用 URLFor 方法所產生的 URL 結尾。Gets or sets a parameter that is appended to the end of any URL that is generated by using the URLFor method.

方法

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)
ProcessEvents(HttpRequest)

WebItem 中呈現 WebClassRenders a WebItem in a WebClass.

ToString()

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

(繼承來源 Object)
URLFor(String, String)

指定 URL,系統必須有這個 URL 才能在瀏覽器中參考 WebClassWebItemSpecifies the URL that the system must have to reference a WebClassWebItem in the browser.

URLFor(WebItem, String)

指定 URL,系統必須有這個 URL 才能在瀏覽器中參考 WebClassWebItemSpecifies the URL that the system must have to reference a WebClassWebItem in the browser.

適用於