//Return databind
    private void BindList()
    {
        letter = Request.QueryString["letter"].ToString();
        OrderBy = (int)Util.Val(Request.QueryString["ob"]);
        SortBy = (int)Util.Val(Request.QueryString["sb"]);

        //Get the current file path
        string ParamURL = Request.CurrentExecutionFilePath + "?letter=" + letter;

        int GetPage = (int)Util.Val(Request.QueryString["page"]);

        if (string.IsNullOrEmpty(this.Request.QueryString["page"]))
        {
            iPage = 1; //If request pageindex is empty, assign pageindex of 1 = 1st page
        }
        else
        {
            iPage = (int)Util.Val(Request.QueryString["page"]); //Grab the querystring pageindex value
        }

        if (string.IsNullOrEmpty(this.Request.QueryString["ps"]))
        {
            psPageSize = 10; //If request pagesize is empty, then assign default pagesize of 10
            lbps.Text = " - Displaying <b>10</b> records per page";
        }
        else
        {
            psPageSize = (int)Util.Val(Request.QueryString["ps"]); //Grab the querystring pagesize value
            lbps.Text = " - Displaying <b>" + psPageSize + "</b> records per page";
        }
        if (psPageSize > 50)
        {
            psPageSize = 10;
        }

        int Layout = (int)Util.Val(Request.QueryString["layout"]);

        //Initialize variable for preferred layout dropdown menu
        SelectedValuePrefLayout = Utility.PreferredLayoutSelectedValue(Layout);
        pLayout = Utility.PreferredLayout(Layout);

        RecipeCat.RepeatColumns = Utility.PreferredLayout(Layout);

        //Initialize variable use for dynamic pagesize dropdown menu.
        psLetter = letter;
        psOrderBy = OrderBy;
        psSortBy = SortBy;
        psPageIndex = iPage;

        //Initialize pagesize and pageindex
        int PageSize = psPageSize;
        int PageIndex = iPage;

        try
        {
            //Get datasource object
            RecipeAlphaLetterProvider GetRecipe = new RecipeAlphaLetterProvider(letter, OrderBy, SortBy, PageIndex, PageSize);

            //Instantiate pager link object
            pagerlinks Pager = new pagerlinks(PageIndex, PageSize, GetRecipe.RecordCount, PlaceHolder1);

            //Get recipe count and assign it to the label
            lblcount.Text = "(" + GetRecipe.RecordCount.ToString() + ") <b>Recipes Start with Letter " + letter + "</b>";

            //Display pager link
            lbPagerLink.Text = Pager.DisplayNumericPagerLink(ParamURL, OrderBy, SortBy, GetPage, pLayout);

            //Display the top right corner pager counter
            lblRecpagetop.Text = Pager.GetTopRightPagerCounterCustomPaging;

            //Display the bottom pager counter
            lblRecpage.Text = Pager.GetBottomPagerCounterCustomPaging;

            //Get BLL object datasource
            RecipeCat.DataSource = GetRecipe.GetRecipeAlphabetLetter();
            RecipeCat.DataBind();

            //Release allocated memory
            GetRecipe = null;
            Pager = null;
        }
        catch
        {

        }
    }
    private void BindList()
    {
        CatId = (int)Util.Val(Request.QueryString["catid"]);
        OrderBy = (int)Util.Val(Request.QueryString["ob"]);
        SortBy = (int)Util.Val(Request.QueryString["sb"]);

        //Get the current file path
        string ParamURL = Request.CurrentExecutionFilePath + "?&catid=" + CatId;

        int GetPage = (int)Util.Val(Request.QueryString["page"]);

        int iPage;

        if (string.IsNullOrEmpty(this.Request.QueryString["page"]))
        {
            iPage = 1; //If request pageindex is empty, assign pageindex of 1 = 1st page
        }
        else
        {
            iPage = (int)Util.Val(Request.QueryString["page"]); //Grab the querystring pageindex value
        }

        //Initialize pagesize and pageindex
        int PageSize = pagerlinks.DefaultPageSize;
        int PageIndex = iPage;

        try
        {
            //Get category datasource object
            ArticleCategoryProvider GetCategory = new ArticleCategoryProvider(CatId, OrderBy, SortBy, PageIndex, PageSize);

            //Instantiate pager link object
            pagerlinks Pager = new pagerlinks(PageIndex, PageSize, GetCategory.RecordCount, PlaceHolder1);

            string artcatname;
            artcatname = GetCategory.Category;
            lbcatname.Text = GetCategory.Category;
            lbcount.Text = "(" + GetCategory.RecordCount.ToString() + ")";

            //Display numeric pager link
            lbPagerLink.Text = Pager.DisplayNumericPagerLink(ParamURL, OrderBy, SortBy, GetPage);

            //Display the top right corner pager counter
            lblRecpagetop.Text = Pager.GetTopRightPagerCounterCustomPaging;

            //Display the bottom pager counter
            lblRecpage.Text = Pager.GetBottomPagerCounterCustomPaging;

            ArticleCat.DataSource = GetCategory.GetCategories();
            ArticleCat.DataBind();

            //Release allocated memory
            GetCategory = null;
            Pager = null;
        }
        catch
        {

        }
    }
    //Return databind
    private void BindList()
    {
        SortBy = (int)Util.Val(Request.QueryString["sid"]);
        Sort_By = (int)Util.Val(Request.QueryString["sb"]);

        iPage = 1;
        psPageSize = 10;
        lbps.Text = " - Displaying <b>10</b> records per page";

        //Get the current file path
        string ParamURL = Request.CurrentExecutionFilePath + "?sid=" + SortBy;

        int GetPage = (int)Util.Val(Request.QueryString["page"]);

        if (!string.IsNullOrEmpty(this.Request.QueryString["page"]))
        {
            iPage = (int)Util.Val(Request.QueryString["page"]); //Grab the querystring pageindex value
        }

        if (!string.IsNullOrEmpty(this.Request.QueryString["ps"]))
        {
            psPageSize = (int)Util.Val(Request.QueryString["ps"]); //Grab the querystring pagesize value
            lbps.Text = " - Displaying <b>" + psPageSize + "</b> records per page";
        }

        if (psPageSize > 50)
        {
            psPageSize = 10;
        }

        int Layout = (int)Util.Val(Request.QueryString["layout"]);

        //Initialize variable for preferred layout dropdown menu
        SelectedValuePrefLayout = Utility.PreferredLayoutSelectedValue(Layout);
        pLayout = Utility.PreferredLayout(Layout);

        RecipeSort.RepeatColumns = Utility.PreferredLayout(Layout);

        //Initialize variable use for dynamic pagesize dropdown menu.
        psOrderBy = SortBy;
        psSortBy = Sort_By;
        psPageIndex = iPage;

        //Initialize pagesize and pageindex
        int PageSize = psPageSize;
        int PageIndex = iPage;

        try
        {
            //We only display top 100 recipes for the sort.aspx page
            int TotalRecords = 100;

            //Sort.aspx goes up to 5 pages only 100/5 = 5 pages
            int MaxSortPageSize = 5;

            //Get category datasource object
            RecipeSortProvider GetRecipe = new RecipeSortProvider(SortBy, Sort_By, PageIndex, PageSize);

            //Instantiate pager link object
            pagerlinks Pager = new pagerlinks(PageIndex, PageSize, TotalRecords, MaxSortPageSize, PlaceHolder1);

            //Dsiplay pager links
            lbPagerLink.Text = Pager.DisplayNumericPagerLink(ParamURL, SortBy, Sort_By, GetPage, pLayout);

            //Display the top right corner pager counter
            lblRecpagetop.Text = Pager.GetTopRightPagerCounterCustomPaging;

            //Display the bottom pager counter
            lblRecpage.Text = Pager.GetBottomPagerCounterCustomPaging;

            //Bind Generic List to a repeater
            RecipeSort.DataSource = GetRecipe.GetRecipeSort();
            RecipeSort.DataBind();

            //Release allocated memory
            GetRecipe = null;

            //Release allocated memory
            Pager = null;
        }
        catch
        {

        }
    }
    //Return databind
    private void BindList()
    {
        CatId = (int)Util.Val(Request.QueryString["catid"]);
        strKeyword = Request.QueryString["find"].ToString();
        OrderBy = (int)Util.Val(Request.QueryString["ob"]);

        //Get the current file path
        string ParamURL = Request.CurrentExecutionFilePath + "?find=" + strKeyword + "&catid=" + CatId;

        int GetPage = (int)Util.Val(Request.QueryString["page"]);

        int iPage;

        if (string.IsNullOrEmpty(this.Request.QueryString["page"]))
        {
            iPage = 1; //If request pageindex is empty, assign pageindex of 1 = 1st page
        }
        else
        {
            iPage = (int)Util.Val(Request.QueryString["page"]); //Grab the querystring pageindex value
        }

        //Initialize pagesize and pageindex
        int PageSize = pagerlinks.DefaultPageSize;
        int PageIndex = iPage;

        try
        {
            //Get category datasource object
            RecipeSearchProvider GetRecipe = new RecipeSearchProvider(strKeyword, CatId, OrderBy, 0, PageIndex, PageSize);

            //Instantiate pager link object
            pagerlinks Pager = new pagerlinks(PageIndex, PageSize, GetRecipe.RecordCount, PlaceHolder1);

            string strSearchIn;

            if (CatId == 0)
            {
                strSearchIn = "<b>in all category</b>.";
            }
            else
            {
                strSearchIn = "in <b>" + GetRecipe.Category + "</b> category.";
            }

            //Get recipe count in category and assign it to the labale
            lblcount.Text = "(" + GetRecipe.RecordCount.ToString() + ") recipes found for keyword (<b>" + strKeyword + "</b>) " + strSearchIn;

            //Get pageindex, pagesize and record count
            //Pager.GetPager(PageIndex, PageSize, GetRecipe.RecordCount, PlaceHolder1);

            //Display numeric pager link
            lbPagerLink.Text = Pager.DisplayNumericPagerLink(ParamURL, OrderBy, 0, GetPage);

            //Display the top right corner pager counter
            lblRecpagetop.Text = Pager.GetTopRightPagerCounterCustomPaging;

            //Display the bottom pager counter
            lblRecpage.Text = Pager.GetBottomPagerCounterCustomPaging;

            //Bind Generic List to a repeater
            RecipeCat.DataSource = GetRecipe.GetRecipeSearchResult();
            RecipeCat.DataBind();

            //Release allocated memory
            GetRecipe = null;

            //Release allocated memory
            Pager = null;
        }
        catch
        {
            lblNorecordFound.Visible = true;
            lblNorecordFound.Text = "No Recipe Found for the keyword (" + strKeyword + "). Please try again.";
        }
    }
    //Return databind
    private void BindList()
    {
        CatId = (int)Util.Val(Request.QueryString["catid"]);
        OrderBy = (int)Util.Val(Request.QueryString["ob"]);
        SortBy = (int)Util.Val(Request.QueryString["sb"]);

        iPage = 1;
        psPageSize = 10;
        lbps.Text = " - Displaying <b>10</b> records per page";

        //Get the current file path
        string ParamURL = Request.CurrentExecutionFilePath + "?catid=" + CatId;

        int GetPage = (int)Util.Val(Request.QueryString["page"]);

        if (!string.IsNullOrEmpty(this.Request.QueryString["page"]))
        {
            iPage = (int)Util.Val(Request.QueryString["page"]); //Grab the querystring pageindex value
        }

        if (!string.IsNullOrEmpty(this.Request.QueryString["ps"]))
        {
            psPageSize = (int)Util.Val(Request.QueryString["ps"]); //Grab the querystring pagesize value
            lbps.Text = " - Displaying <b>" + psPageSize + "</b> records per page";
        }

        if (psPageSize > 50)
        {
            psPageSize = 10;
        }

        int Layout = (int)Util.Val(Request.QueryString["layout"]);

        //Initialize variable for preferred layout dropdown menu
        SelectedValuePrefLayout = Utility.PreferredLayoutSelectedValue(Layout);
        pLayout = Utility.PreferredLayout(Layout);

        RecipeCat.RepeatColumns = Utility.PreferredLayout(Layout);

        //Initialize variable use for dynamic pagesize dropdown menu.
        psCatId = CatId;
        psOrderBy = OrderBy;
        psSortBy = SortBy;
        psPageIndex = iPage;

        //Initialize pagesize and pageindex
        int PageSize = psPageSize;
        int PageIndex = iPage;

        try
        {
            //Get category datasource object
            RecipeCategoryProvider GetCategory = new RecipeCategoryProvider(CatId, OrderBy, SortBy, PageIndex, PageSize);

            //Instantiate pager object
            pagerlinks Pager = new pagerlinks(PageIndex, PageSize, GetCategory.RecordCount, PlaceHolder1);

            lblcatname2.Text = GetCategory.Category;
            lblcount.Text = "(" + GetCategory.RecordCount.ToString() + ")";

            //Display pager links
            lbPagerLink.Text = Pager.DisplayNumericPagerLink(ParamURL, OrderBy, SortBy, GetPage, pLayout);

            //Display the top right corner pager counter
            lblRecpagetop.Text = Pager.GetTopRightPagerCounterCustomPaging;

            //Display the bottom pager counter
            lblRecpage.Text = Pager.GetBottomPagerCounterCustomPaging;

            //Bind Generic List to a repeater
            RecipeCat.DataSource = GetCategory.GetCategories();
            RecipeCat.DataBind();

            //Deallocate object memory
            GetCategory = null;

            //Release object allocated memory
            Pager = null;
        }
        catch
        {

        }
    }