Question

i have LinkButton inside ListView control, i want get active number page in DataPager with click on LinkButton.

protected void addToCart_Click(object sender, CommandEventArgs e)
{
    //get active number page
}

please help me.

Était-ce utile?

La solution

you could do something like the following assuming that you are doing this in asp.net

protected void ListView1_PagePropertiesChanging(object sender,PagePropertiesChangingEventArgs e)    
{
    int currPage = (e.StartRowIndex / e.MaximumRows)+1;
    Response.Write(currPage.ToString());
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top