ther is nothing wrong with my setup
it is the design of DBResourceProviderFactory and the content of the table BugNet_StringResources that dos not match
if you look at DBResourceProviderFactory
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
{
Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "DBResourceProviderFactory.CreateGlobalResourceProvider({0})", classKey));
return new DBResourceProvider(classKey);
}
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
{
Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "DBResourceProviderFactory.CreateLocalResourceProvider vp({0}", virtualPath));
// we should always get a path from the runtime
string classKey = virtualPath;
if (!string.IsNullOrEmpty(virtualPath))
{
virtualPath = virtualPath.Remove(0, 1);
classKey = virtualPath.Remove(0, virtualPath.IndexOf('/') + 1);
}
return new DBResourceProvider(classKey);
}
you can see that when you call GetLocalResourceObject("Home")
CreateLocalResourceProvider is called with the virtual path "/UserControls/TabMenu.ascx"
and then the UserControl is stripped off an the other cunstructor is called with only "TabMenu.ascx"
if you look in the database there is no ResourceType with the name "TabMenu.ascx" only with the name "UserControls/TabMenu.ascx"
i can see that the hole localization thingy is in an early stage ther just has to be made a desition how to proceed keep the DBRsourceProviderFactory code and just use file names in the DB or use the whole virtual path in the DB