Hi nauna,
Check this example. Now please take its reference and correct your code.
CS.aspx
<asp:Button ID="btnNext" Text="Next" runat="server" OnClick="btnNext_Click" />
CS.aspx.cs
protected void btnNext_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx?ID=1");
}
Default.aspx
<asp:Button Text="Check" runat="server" OnClick="Increment" />
Default.aspx.cs
protected void Increment(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
{
int id = Convert.ToInt32(Request.QueryString["ID"]);
Response.Redirect("Default.aspx?ID=" + (id + 1));
}
else
{
Response.Redirect("Default.aspx?ID=1");
}
}
Screenshot