WebFormsReferenceManager.GetUserControlPath(String, String) 方法

定义

获取具有指定标记前缀和标记名称的用户控件的相对 URL 路径。Gets the relative URL path for the user control with the specified tag prefix and tag name.

public:
 abstract System::String ^ GetUserControlPath(System::String ^ tagPrefix, System::String ^ tagName);
public abstract string GetUserControlPath (string tagPrefix, string tagName);
abstract member GetUserControlPath : string * string -> string
Public MustOverride Function GetUserControlPath (tagPrefix As String, tagName As String) As String

参数

tagPrefix
String

要检索的用户控件的标记前缀。The tag prefix of the user control to retrieve.

tagName
String

要检索的用户控件的标记名称。The tag name of the user control to retrieve.

返回

String

如果找到,则为表示指定用户控件的相对 URL 路径的字符串;否则为 nullA string representing the relative URL path for the specified user control, if found; otherwise, null.

注解

GetUserControlPath使用标记前缀和名称在当前文档中查找用户控件注册指令,并返回 src register 指令中定义的属性值。GetUserControlPath uses the tag prefix and name to locate the user control register directive in the current document, and returns the src attribute value defined in the register directive.

适用于

另请参阅