WebResourceAttribute(String, String) 建構函式

定義

初始化一個新的類別實例 WebResourceAttribute ,使用指定的網頁資源與資源內容類型。

public:
 WebResourceAttribute(System::String ^ webResource, System::String ^ contentType);
public WebResourceAttribute(string webResource, string contentType);
new System.Web.UI.WebResourceAttribute : string * string -> System.Web.UI.WebResourceAttribute
Public Sub New (webResource As String, contentType As String)

參數

webResource
String

網路資源的名稱。

contentType
String

資源類型,例如 "image/gif""text/javascript"

例外狀況

webResourcenull 空字串(“”)。

-或-

contentTypenull 空字串(“”)。

適用於