AjaxControlToolkit.PersistentStoreManager.RemoveFileFromSession C# (CSharp) Метод

RemoveFileFromSession() публичный Метод

public RemoveFileFromSession ( string controlId ) : void
controlId string
Результат void
        public void RemoveFileFromSession(string controlId)
        {
            var currentContext = GetCurrentContext();
            if(currentContext == null)
                return;

            var keysToRemove = new Collection<string>();
            foreach(string key in currentContext.Session.Keys) {
                if(key.StartsWith(GetFullID(controlId)))
                    keysToRemove.Add(key);
            }
            foreach(string key in keysToRemove) {
                currentContext.Session.Remove(key);
            }
        }