Repeater paging problem

Discussion in 'ASP .Net Security' started by Viktor Popov, Sep 22, 2004.

  1. Viktor Popov

    Viktor Popov Guest

    Hi,

    I'm trying to do the following but I can't understand what's wrong. Could
    you help me here!
    I do paging with a Repeater like this:

    DataSet ds = new DataSet();
    dad.Fill(ds, "MyOffers");
    if(ds.Tables[0].Rows.Count==0)
    Delete.Enabled=false;

    PagedDataSource objPds = new PagedDataSource();
    objPds.DataSource = ds.Tables[0].DefaultView;
    objPds.AllowPaging = true;
    objPds.PageSize = 14;
    int CurPage;
    int FirstPage=1;
    int LastPage=objPds.PageCount;
    if (Request.QueryString["Page"] != null)
    CurPage=Convert.ToInt32(Request.QueryString["Page"]);
    else
    CurPage=1;
    objPds.CurrentPageIndex = CurPage-1;
    lblCurrentPage.Text = "No?aieoa ?: " + CurPage.ToString() + " io iaui " +
    objPds.PageCount.ToString();
    if(!objPds.IsFirstPage)
    lnkFirst.NavigateUrl=Request.CurrentExecutionFilePath +"?Page=" +
    Convert.ToString(FirstPage);
    if(!objPds.IsFirstPage)
    lnkPrev.NavigateUrl=Request.CurrentExecutionFilePath + "?Page=" +
    Convert.ToString(CurPage-1);
    if(!objPds.IsLastPage)
    lnkNext.NavigateUrl=Request.CurrentExecutionFilePath + "?Page=" +
    Convert.ToString(CurPage+1);
    if(!objPds.IsLastPage)
    lnkLast.NavigateUrl=Request.CurrentExecutionFilePath + "?Page=" +
    Convert.ToString(LastPage);
    MyRepeater.DataSource=objPds;
    MyRepeater.DataBind();

    On this page I have a DELETE_BUTTON. When I have more than 14 results(more
    than 1 page) and when I push the Button it doesn't work. When I go to the
    last page and push the button the code in ON_CLICK_METHOD works. I can't
    understand why. Could you help me here?

    Thanks a lot!

    Viktor



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.767 / Virus Database: 514 - Release Date: 21.9.2004 a.
    Viktor Popov, Sep 22, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,684
    Scott Allen
    Oct 8, 2004
  2. wh1974
    Replies:
    0
    Views:
    2,430
    wh1974
    Jan 12, 2005
  3. Viktor Popov

    Repeater paging problem

    Viktor Popov, Sep 22, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    158
    Viktor Popov
    Sep 22, 2004
  4. Viktor Popov

    Repeater paging problem

    Viktor Popov, Sep 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    105
    Viktor Popov
    Sep 22, 2004
  5. Viktor Popov

    Repeater paging problem

    Viktor Popov, Sep 22, 2004, in forum: ASP .Net Web Controls
    Replies:
    13
    Views:
    283
    Viktor Popov
    Sep 23, 2004
Loading...

Share This Page