Example #1
0
    protected void btnNext_Click(object sender, EventArgs e)
    {
        if (PageNumberQS > 0 && !LandingPageQS)
        {
            SyncPostPage();
        }

        //Redirect
        bool   autoScroll = chkAutoScroll.Checked;
        string url        = UrlCreator.BuildUrl(UserIDQS, PageNumberQS + 1, false, autoScroll);

        if (PageNumberQS == 0)     //go to landing page
        {
            url = UrlCreator.BuildUrl(UserIDQS, PageNumberQS + 1, true, autoScroll);
        }
        if (PageNumberQS == 1 && LandingPageQS)
        {
            url = UrlCreator.BuildUrl(UserIDQS, PageNumberQS, false, autoScroll);
        }
        if (PageNumberQS == 25)     //TODO: Hardcoded pagesize.
        {
            url = UrlCreator.BuildUrl(UserIDQS, PageNumberQS + 1, true, autoScroll);
        }
        if (PageNumberQS == 26 && LandingPageQS)        //TODO: hardcoded pagesize.
        {
            url = UrlCreator.BuildUrl(UserIDQS, PageNumberQS, false, autoScroll);
        }

        Response.Redirect(url);
    }
Example #2
0
    protected void btnPrev_Click(object sender, EventArgs e)
    {
        //TODO: Son page'den geri dönmek isterse son sayfada update ederek dönme.
        if (PageNumberQS > 0 && !LandingPageQS)
        {
            SyncPostPage();
        }

        //Redirect
        bool autoScroll = chkAutoScroll.Checked;
        var  url        = UrlCreator.BuildUrl(UserIDQS, PageNumberQS - 1, false, autoScroll);

        if (PageNumberQS == 1 || PageNumberQS == 26)
        {
            if (!LandingPageQS)
            {
                url = UrlCreator.BuildUrl(UserIDQS, PageNumberQS, true, autoScroll);
            }
        }
        Response.Redirect(url);
    }