Exemplo n.º 1
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));
                }
            }
        }
Exemplo n.º 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));
                }
            }
        }