public static string get_NavigatePath(int iCategroryId, string postLink) { UrlQuery postURL = new UrlQuery(postLink); postURL.Remove("contentid"); postURL.Remove("mnuid"); postURL.Remove("catid"); string sNaviPath = ""; string sRootNaviFormat = "<span class='icon-11-arr-target navigator-text'><a href='{0}'>{1}</a></span>"; string sChildNaviFormat = "<span class='icon-11-arr-navigate navigator-text'><a href='{0}'>{1}</a></span>"; DataTable CatInfo = LegoWebSite.Buslgic.Categories.get_CATEGORY_BY_ID(iCategroryId).Tables[0]; int icatid = iCategroryId; string scatname = CatInfo.Rows[0]["CATEGORY_" + System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.ToUpper() + "_TITLE"].ToString(); int ipcatid = int.Parse(CatInfo.Rows[0]["PARENT_CATEGORY_ID"].ToString()); postURL.Set("catid", icatid.ToString()); sNaviPath = (ipcatid > 0 ? string.Format(sChildNaviFormat, postURL.AbsoluteUri, scatname) : string.Format(sRootNaviFormat, postURL.AbsoluteUri, scatname)); while (ipcatid > 0) { iCategroryId = ipcatid; CatInfo = LegoWebSite.Buslgic.Categories.get_CATEGORY_BY_ID(iCategroryId).Tables[0]; icatid = iCategroryId; scatname = CatInfo.Rows[0]["CATEGORY_" + System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName.ToUpper() + "_TITLE"].ToString(); ipcatid = int.Parse(CatInfo.Rows[0]["PARENT_CATEGORY_ID"].ToString()); postURL.Set("catid", icatid.ToString()); sNaviPath = (ipcatid > 0 ? string.Format(sChildNaviFormat, postURL.AbsoluteUri, scatname) : string.Format(sRootNaviFormat, postURL.AbsoluteUri, scatname)) + sNaviPath; } return(sNaviPath); }