共用方式為


UnsecuredLayoutsPageBase.GetResourceString Method

Returns a localized string constructed from a string in a resource (.resx) file in a subfolder of %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ and from the specified array of strings.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Function GetResourceString ( _
    strId As String, _
    ParamArray values As Object() _
) As String
'Usage
Dim instance As UnsecuredLayoutsPageBase
Dim strId As String
Dim values As Object()
Dim returnValue As String

returnValue = instance.GetResourceString(strId, _
    values)
public string GetResourceString(
    string strId,
    params Object[] values
)

Parameters

  • values
    Type: []

    Specific strings that will replace placeholders (such as "%1") in the constructed string.

Return Value

Type: System.String
A String constructed from a string in a resource file (that may include placeholders) and an array of specific strings that replace the placeholders, if any.

Remarks

For example, the file wss.en-US.resx in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG\Resources\ assigns the string "Enable or disable access requests for this %1" to the lookup ID "people_accessrequestdesc". If you passed the latter ID and a single member string array containing "Web site" to GetResourceString, then it would return "Enable or disable access requests for this Web site".

See Also

Reference

UnsecuredLayoutsPageBase Class

UnsecuredLayoutsPageBase Members

Microsoft.SharePoint.WebControls Namespace