This topic has not yet been rated - Rate this topic

TemplateControl.ReadStringResource Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Reads a string resource. The ReadStringResource method is not intended for use from within your code.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)
public Object ReadStringResource()

Return Value

Type: System.Object
An object representing the resource.
Exception Condition
NotSupportedException

The ReadStringResource is no longer supported.

The ReadStringResource method is not intended for use from within your code.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
FindResource failed with error -2147023083 (ASCX inheritance)
(ASP.NET 4 specific)
You may encounter horrible error "FindResource failed with error -2147023083" when you are attempting to create ASCX inheritance.
This method is called by code generated from you ASCX file. It IMO should not be called from there in ASP.NET 4.
You may try ensuring that your code is really processed by v4 CodeDOM generator.

See also FindResource (http://msdn.microsoft.com/en-us/library/ms648042.aspx)

You also may try working this issue around by adding following code to one of your UserControl-derived base classes:

[EditorBrowsable(EditorBrowsableState.Never)]
protectednewobject ReadStringResource()
{
try { returnbase.ReadStringResource(); }
catch (NotSupportedException) { throw; }
catch { returnnull; }
}

[EditorBrowsable(EditorBrowsableState.Never)]
protectednewvoid SetStringResourcePointer(Object stringResourcePointer, int maxResourceOffset){
if(stringResourcePointer == null) return;
try{
base.SetStringResourcePointer(stringResourcePointer,maxResourceOffset );
}catch{}
}