/// <summary> /// ASP.NET passes the full page virtual path (/MyApp/subdir/test.aspx) wich is /// the effective ResourceSet id. We'll store only an application relative path /// (subdir/test.aspx) by stripping off the base path. /// </summary> /// <param name="virtualPath"></param> /// <returns></returns> public override IResourceProvider CreateLocalResourceProvider(string virtualPath) { // DEPENDENCY HERE: use Configuration class to strip off Virtual path leaving // just a page/control relative path for ResourceSet Ids // ASP.NET passes full virtual path: Strip out the virtual path // leaving us just with app relative page/control path string ResourceSetName = WebUtils.GetAppRelativePath(virtualPath); DbSimpleResourceProvider provider = new DbSimpleResourceProvider(null, ResourceSetName.ToLower()); return provider; }
/// <summary> /// ASP.NET passes the full page virtual path (/MyApp/subdir/test.aspx) wich is /// the effective ResourceSet id. We'll store only an application relative path /// (subdir/test.aspx) by stripping off the base path. /// </summary> /// <param name="virtualPath"></param> /// <returns></returns> public override IResourceProvider CreateLocalResourceProvider(string virtualPath) { // DEPENDENCY HERE: use Configuration class to strip off Virtual path leaving // just a page/control relative path for ResourceSet Ids // ASP.NET passes full virtual path: Strip out the virtual path // leaving us just with app relative page/control path string ResourceSetName = WebUtils.GetAppRelativePath(virtualPath); DbSimpleResourceProvider provider = new DbSimpleResourceProvider(null, ResourceSetName.ToLower()); return(provider); }