TemplateControl.ReadStringResource Method
.NET Framework 4
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.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| NotSupportedException |
The ReadStringResource is no longer supported. |
The ReadStringResource method is not intended for use from within your code.
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.
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:
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{}
}
- 9/16/2010
- Đonny
- 9/26/2010
- Thomas Lee