protected void btnNext_Click(Object Sender, EventArgs e) { int intRequest = Int32.Parse(Request.QueryString["rid"]); int intService = Int32.Parse(lblService.Text); int intNumber = Int32.Parse(lblNumber.Text); DataSet dsRebuild = oServer.GetRebuild(intRequest, intService, intNumber); if (dsRebuild.Tables[0].Rows.Count > 0) { oServer.UpdateRebuild(intRequest, intService, intNumber, Int32.Parse(lblId.Text), ""); } else { oServer.AddRebuild(intRequest, intService, intNumber, Int32.Parse(lblId.Text), ""); } if (btnNext.Text != "Update") { oRequestItem.UpdateForm(intRequest, true); } Response.Redirect(oPage.GetFullLink(intPage) + "?rid=" + intRequest.ToString()); }