コード例 #1
0
        protected void SetNextPrevLinkVisibility(PagedDataNextPrevLinkWrapper.PagedDataDirection dir, PagedDataNextPrevLinkPair lnkPair, int iPage, bool ShowLink)
        {
            if (lnkPair.PageLink != null)
            {
                SetNextPrevLink(dir, lnkPair.PageLink, iPage);
                lnkPair.PageLink.Visible = ShowLink;
            }

            if (lnkPair.LinkWrapper != null)
            {
                lnkPair.LinkWrapper.Visible = ShowLink;
            }
        }
コード例 #2
0
        protected void SetNextPrevLink(PagedDataNextPrevLinkWrapper.PagedDataDirection dir, PagedDataNextPrevLink lnkNP, int iPage)
        {
            string sSearchTerm = GetSearchTerm();
            string sPageParm   = this.ID.ToString() + "Nbr";

            if (lnkNP != null)
            {
                HttpContext context = HttpContext.Current;

                lnkNP.NavDirection = dir;
                lnkNP.SetText();

                lnkNP.NavigateUrl = String.Format("{0}?{1}={2}", SiteData.CurrentScriptName, sPageParm, iPage);

                if (!String.IsNullOrEmpty(sSearchTerm))
                {
                    lnkNP.NavigateUrl = String.Format("{0}&{1}={2}", lnkNP.NavigateUrl, SiteData.SearchQueryParameter, context.Server.UrlEncode(sSearchTerm));
                }
            }
        }