For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > May 2005 > Custom Resource provider factory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Custom Resource provider factory
OleOj

2005-05-31, 8:58 pm

In the Beta 2 of Visual Studio I have tried to create a custom resource
provider. It works perfectly when I run the application, but when I load the
control in desing mode I get an
Error 1 MyLabel1:
Could not load type 'XResourceProviderFactory' from assembly
'Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
C:\source\2005test\site1\Default.aspx
C:\...\site1\
The code for the Custom resource provider factory is in a seperate signed
dll, and the devenv has tried to access it in the bin directory with success.

Here is the main code
< DesignTimeResourceProviderFactoryAttribu
te("XResourceProviderFactory")> _
Public NotInheritable Class XResourceProviderFactory
Inherits System.Web.Compilation.ResourceProviderFactory

Public Overrides Function CreateGlobalResourceProvider(ByVal
classKey As String) As System.Web.Compilation.IResourceProvider
Return New DBResourceProvider(classKey)
End Function

Public Overrides Function CreateLocalResourceProvider(ByVal
virtualPath As String) As System.Web.Compilation.IResourceProvider
Return New DBResourceProvider(virtualPath)
End Function
End Class


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com