标签:com http blog style class div img code java log c
protected void Page_Load(object sender, EventArgs e) { string folderURL = this.Page.Request.QueryString["RootFolder"]; if (string.IsNullOrEmpty(folderURL) == false) { string url = this.Page.Request.Url.AbsolutePath; var nameValues = HttpUtility.ParseQueryString(this.Page.Request.QueryString.ToString()); StringBuilder sb = new StringBuilder(); string[] arrStr = folderURL.Split(‘/‘); int arrLength = arrStr.Length; string FolderCTID = this.Page.Request.QueryString["FolderCTID"]; string View = this.Page.Request.QueryString["View"]; string tab = this.Page.Request.QueryString["tab"]; string module = this.Page.Request.QueryString["module"]; if (arrStr != null && arrLength > 0) { for (int i = 0; i < arrLength; i++) { string name = arrStr[i]; if (name.Length > 0) { string rootFolderValue = folderURL.Substring(0, folderURL.LastIndexOf(name)); rootFolderValue = rootFolderValue + name + "/"; nameValues.Set("RootFolder", rootFolderValue); string newUrl = url + "?" + string.Format("RootFolder={0}&FolderCTID={1}&View={2}&tab={3}&module={4}", HttpUtility.UrlEncode(rootFolderValue), FolderCTID, HttpUtility.UrlEncode(View), tab, HttpUtility.UrlEncode(module)); if (i == 1) { name = "根目录"; } sb.Append("<a href=‘" + newUrl + "‘>" + name + "</a> "); if (i != arrLength - 1) { sb.Append(">>"); } } } } pathStr = sb.ToString(); } }
查看SharePoint文档库是,显示层次目录,可以点击返回层次,布布扣,bubuko.com
查看SharePoint文档库是,显示层次目录,可以点击返回层次
标签:com http blog style class div img code java log c
原文地址:http://www.cnblogs.com/xzwen/p/SharePoint_DocumnetLib_RootURL.html