Hello,
theres a part of code in my webpage:
.aspx code
runat="server"
ID="ResGrid"
AllowPaging="True"
onPageIndexChanged="setPage"
PageSize="15" >
runat="server"
ID="Panel1"
GroupingText="Preferences" >
Number of results per page:
10
15
20
25
30
.aspx.cs code
protected void submitPre_Click(object sender, EventArgs e)
{
ResGrid.PageSize = Convert.ToInt32(selectNumResPerPage.SelectedValue);
}
The problem with this program is that I have to click the submitPre button twice in order to change the PageSize value. While I run my program, I change the selected value of the dropdownlist, I click on the "save changes" button, the page reloads, but there's no change. When I click on the button again and the page reloads for second time, then theres a the change I want to do. Why is that happening;
Can anyone help me please?
Answers
Know the answer? Post it. Somebody with the same question will find it here.