WebResourceAttribute(String, String) 构造函数

定义

使用指定的 Web 资源和资源内容类型初始化类的新实例 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

Web 资源的名称。

contentType
String

资源类型,例如 "image/gif""text/javascript"

例外

webResourcenull 或空字符串(“)。

-或-

contentTypenull 或空字符串(“)。

适用于