LoadResource(String) Method

The LoadResource method of the WebPart returns a string that describes the localized Name, Category, and Description property values of the specified resource.

Parameters

id   A string that specifies the identifier for the resource.

Return Value

A string that specifies the localized Name, Category, and Description property values of the resource as defined by the ResourcesAttribute of the resource.

Example

The following code example shows a Web Part that overrides the LoadResource method. For this example to work, you must add a resource (.resx) to your assembly project. To do that in Microsoft Visual Studio .NET, right-click your assembly in Solution Explorer, point at Add and click Add New Item. In the Add New Item dialog box, select Assembly Resource File, and then click Open.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security