예제 #1
0
        /// <summary>
        /// 确保ResourceManager实例的Page和当前页面一致
        /// </summary>
        /// <param name="page"></param>
        internal static void EnsureResourceManagerInstance(Page page)
        {
            ResourceManager rm = ResourceManager.Instance;

            // 在 Server.Transfer 时会进入此分支
            if (rm.Page != page)
            {
                rm = new ResourceManager(page);
                HttpContext.Current.Items[ResourceManager.RESOURCE_MANAGER_CONTEXT_NAME] = rm;
            }
        }