/// <summary> /// Gets the real URL. /// </summary> /// <param name="requestedUrl">The requested URL.</param> /// <returns></returns> private string Get_WebBuilderURL(string requestdURL) { string[] PageNames = requestdURL.Split('/'); string PageName = PageNames[PageNames.Length - 1].Split('.')[0]; Pages.PageMgr myPageMgr = new Pages.PageMgr(); if (myPageMgr.Chk_PageName_Live(PageName)) { List <PageIndex> myPageIndexs = myPageMgr.Get_PageIndex_ByName(PageName, "1"); foreach (PageIndex myPageIndex in myPageIndexs) { UrlMgr myUrlMgr = new UrlMgr(); string WebBuilderURL = myUrlMgr.Get_PageIndex_URL(myPageIndex.PageIndexID).ToLower() + ".aspx"; if (requestdURL == WebBuilderURL) { string _pageindexid = Chk_PageType(myPageIndex); return("~/Default.aspx?PageIndexID=" + _pageindexid); } } } return(null); }
protected void tbx_PageName_TextChanged(object sender, EventArgs e) { URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr(); tbx_PageURL.Text = myUrlMgr.Get_PageIndex_URL(_parent_pageindexid) + "/" + tbx_PageName.Text + ".aspx"; }
private void DataFill_PageURLs() { // PageURL PageMgr myPageMgr = new PageMgr(); PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid); URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr(); tbx_PageURL.Text = myUrlMgr.Get_PageIndex_URL(myPageIndex.Parent_PageIndexID) + "/" + tbx_PageName.Text + ".aspx"; }