private void NavigateTo(string path) { RequestedPath = path; if (RequestedPath.EndsWith("..")) { RequestedPath = RequestedPath.Substring(0, RequestedPath.Length - 3); if ((RequestedPath.LastIndexOf("\\") != -1)) { RequestedPath = RequestedPath.Substring(0, RequestedPath.LastIndexOf("\\")); } else { RequestedPath = ""; } } ExpandAndSelectTreeNode(RequestedPath); ViewState["FileManagerPath"] = RequestedPath; ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page); if (scriptManager.IsInAsyncPostBack) { scriptManager.AddHistoryPoint("path", path); } }