mrresearchman
New Member
I have 2 buttons (saveAll, toNextStatus)saveAll, saves a gridview and runs Response.redirect to the same page. toNextStatus, is shown as below.\[code\] protected void toNextStatus_Click(object sender, EventArgs e) { DataTable dt = OrderDetailData.Check2to3(Session["Id"].ToString()); if (dt.Rows.Count > 0) { lbl_Error.Text = "Please fill all fields"; lbl_Error.Visible = true; } else { OrderDefinitionData.UpdateStatus(Session["Id"].ToString(), "3", "2"); Response.Redirect("~/Default.aspx"); } }\[/code\]After executing the application, I click saveAll -> No problem it saves the gridview, I click toNextStatus it shows "Please fill all fields."Now I want to make my toNextStatus button something like "SaveAndToNextStatus", so I want to merge the two buttons. For that reason I add below code part into the above code\[code\]begv_OrderDetail.SaveClicked(sender, e); //Click event of first button saveAll\[/code\]After executing the application, I click toNextStatus, it saves the page, but it does not show "Please fill all field"EDIT:I have a control inside my gridview(1) (dropdownlist_ship_container), and I have another gridview(2) on the same page named (ship_container_manager), when a ship_container in (1) is selected and saved, I need to refresh my page so that my ship_container_manager gets refreshed (by making delete button visiblity = false near the used containers), and hence user may not remove this container. Since my (1) is a webcontrol, I am not able to access (2) inside my (1)'s save button, so I redirect to the same page inside (1)'s save button for (2) to be refreshed