 |
|
|
 |
|
 |
Really This is useful for me.Thanks.
Happy Coding
|
|
|
|
 |
|
|
 |
|
 |
project solution not exists
|
|
|
|
 |
|
|
 |
|
 |
I've rewrote the code to the C# syntax, so here it is.
But I've problem with pageDS.IsLastPage it's not working for me and I don't know why, also pageDS.PageCount == _currPage doesn't work.
but anyways here is the code:
public partial class FinishedList : System.Web.UI.Page
{
PagedDataSource pageDS;
int _currPage = 0;
protected void Page_Load(object sender, EventArgs e)
{
pageDS = new PagedDataSource();
string sql = @"SELECT ******************";
DataTable dt = DBHelper.GetDataTable(sql);
pageDS.DataSource = dt.DefaultView;
pageDS.AllowPaging = true;
pageDS.PageSize = 10;
if (!String.IsNullOrEmpty(Request.QueryString["pg"]))
{
_currPage = Convert.ToInt32(Request.QueryString["pg"]);
}
else
{
_currPage = 1;
}
pageDS.CurrentPageIndex = _currPage - 1;
lblCurrpage.Text = "Strana: " + _currPage.ToString() + " z " + pageDS.PageCount.ToString();
if (pageDS.IsFirstPage)
{
lnkPrev.Visible = false;
}else
{
lnkPrev.NavigateUrl = Request.CurrentExecutionFilePath + "?pg=" + (_currPage - 1).ToString();
lnkPrev.Visible = true;
}
if (pageDS.PageCount == _currPage) {
lnkNext.Visible = false;
}
{
lnkNext.NavigateUrl = Request.CurrentExecutionFilePath + "?pg=" + (_currPage + 1).ToString();
lnkNext.Visible = true;
}
Repeater1.DataSource = pageDS;
Repeater1.DataBind();
}
Rammi.cz
|
|
|
|
 |
|
 |
problem found and fixed... missing "else"
if (pageDS.IsLastPage)
{
lnkNext.Visible = false;
}
else
{
lnkNext.NavigateUrl = Request.CurrentExecutionFilePath + "?pg=" + (_currPage + 1).ToString();
lnkNext.Visible = true;
}
Rammi.cz
|
|
|
|
 |
|
 |
thx alot...excellent code
|
|
|
|
 |
|
 |
thank you thank you thank you...i spent my entire day in experimenting and finding a good way of paging. This is AWESOME.
thanks again
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
 |
|
 |
I didn't know about the PagedDataSource class... pretty neat!
www.dotneat.net
www.2earth.org
|
|
|
|
 |
|
 |
i wanted the same to work on datalist. thanks vey much its working fine.
excellent and simple code
|
|
|
|
 |
|
 |
how to make to works this with another query string. Example I have Default.aspx?id=1&pid=2&ppid=3&pppid=4 to add Default.aspx?id=1&pid=2&ppid=3&pppid=4&Page=2
|
|
|
|
 |
|
 |
This post eventually led to me being able to use this information. Not without quite a bit of mucking around first though.
Read everyones posts, and with all of the added comments, you should be able to piece together a solution like I did, without too much VB coding knowledge.
|
|
|
|
 |
|
 |
Thank u so much it's working fine.
With Regards
Ganesan.S
Software Engineer
|
|
|
|
 |
|
 |
Where we need to place the label and the link controls in the Repeater?
With Regards
Ganesan.S
Software Engineer
|
|
|
|
 |
|
 |
Hello,
I'm using Access and how do I now connect it? Hope you could help!
|
|
|
|
 |
|
 |
Hello,
I'm new with .net and wondering how do I declare the ds variable at myDA.Fill(ds, "t1")?
|
|
|
|
 |
|
 |
I just got it! Dim ds = New DataSet
|
|
|
|
 |
|
 |
Just too good. I was finding a paging code for the last whole week.
You saved my day bro !
|
|
|
|
 |
|
 |
Thanx man thank you so much it helped me alot i was really in a big problem coz i wanna do paging in my rewrited url's and i got my solution from ur side thanx once again..
|
|
|
|
 |
|
 |
dim pageds as new PageDataSource
after that jz use ur skill to use this pageds.
Good code actually.Help me solve datalist paging problem.
|
|
|
|
 |
|
 |
Please explain the code how to use int with vb.net
asif
|
|
|
|
 |
|
 |
Short and simple. Like it...Keep it up!
BDAVAR
|
|
|
|
 |
|
 |
Sorry, but i bon't know the meaning of the variable pageds. It isnot decalared as a variable neither as an asp element
Thanks
|
|
|
|
 |
|
 |
May it's an instance of the class PagedDataSource.
|
|
|
|
 |