ASP datapager PreRender with page redirect

420 Views Asked by At

i have asp web page with listview in it. i added datapager to the listview with PreRender event to populte the listview with relevant data.in the PreRender event code i have redirect function as below in order to add current page number to the querystring.the problem is that this redirct generate the PreRender event and i have a loop with no exit.how can i add current page number to the querystring without having this loop?

Response.Redirect("~/Default.aspx?keyword=" + keyword + "&Page=" + pagenumber, false);
0

There are 0 best solutions below