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.DataSour ce = ds.Tables[0].DefaultView;
objPds.AllowPag ing = true;
objPds.PageSize = 14;
int CurPage;
int FirstPage=1;
int LastPage=objPds .PageCount;
if (Request.QueryS tring["Page"] != null)
CurPage=Convert .ToInt32(Reques t.QueryString["Page"]);
else
CurPage=1;
objPds.CurrentP ageIndex = CurPage-1;
lblCurrentPage. Text = "óÔÒÁÎÉÃÁ ?: " + CurPage.ToStrin g() + " ÏÔ ÏÂÝÏ " +
objPds.PageCoun t.ToString();
if(!objPds.IsFi rstPage)
lnkFirst.Naviga teUrl=Request.C urrentExecution FilePath +"?Page=" +
Convert.ToStrin g(FirstPage);
if(!objPds.IsFi rstPage)
lnkPrev.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(CurPage-1);
if(!objPds.IsLa stPage)
lnkNext.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(CurPage+1);
if(!objPds.IsLa stPage)
lnkLast.Navigat eUrl=Request.Cu rrentExecutionF ilePath + "?Page=" +
Convert.ToStrin g(LastPage);
MyRepeater.Data Source=objPds;
MyRepeater.Data Bind();
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.766 / Virus Database: 513 - Release Date: 17.9.2004 a.