How do I create a popup box for my wizard control?

I have a wizard control and am needed to create a popup box (dialog) that, depending on which option the user chooses, will either allow the code to continue to execute or stop/prevent the remaining code within the onclick event from continuing to execute. My problem is that the onfinishbuttonclick event for the wizard is already being used to do some things and I'm not sure how to work a popup dialog within the event. Any ideas or examples would be appreciated. Thank you.

current HTML
                                    <asp:Wizard ID="wzInspection" runat="server" BackColor="#EFF3FB" 
	                                    bordercolor="#B5C7DE" BorderWidth="1px" DisplaySideBar="false" 
	                                    Font-Names="Verdana" Font-Size="0.8em" Headertext="" 
	                                    Height="638px" Width="865px" onactivestepchanged="wzInspection_ActiveStepChanged" 
	                                    onfinishbuttonclick="wzInspection_FinishButtonClick" 
                                        FinishCompleteButtontext="Complete" FinishCompleteButtonStyle-ForeColor="Blue"
	                                    onnextbuttonclick="wzInspection_NextButtonClick" 
	                                    onpreviousbuttonclick="wzInspection_PreviousButtonClick"
                                        OnCancelButtonClick="wzInspection_OnCancelButtonClick"
                                        displaycancelbutton="true" 
                                        ActiveStepIndex="0" >

Open in new window


current C# code
        protected void wzInspection_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            // this is the Complete button on the Misc step
            bool bWeGood = true;

            FinalValidation();

            if (Session["InspectionAccepted"].ToString() == "F" && Session["ReadOnly"].ToString() != "1") //SECURITY
            {
                string InspDateToUpdate = string.Empty;

                if (txtInspectionDT.Text == "")
                {
                    InspDateToUpdate = "ISPDT1";
                    txtInspectionDT.Text = ArrowGlobalFunc.convertDateToInt(DateTime.Now.ToShortDateString());
                }
                else if (txtInspectionDT2.Text == "")
                {
                    InspDateToUpdate = "ISPDT2";
                    txtInspectionDT2.Text = ArrowGlobalFunc.convertDateToInt(DateTime.Now.ToShortDateString());
                }
                else
                {
                    InspDateToUpdate = "ISPDT3";
                    txtInspectionDT3.Text = ArrowGlobalFunc.convertDateToInt(DateTime.Now.ToShortDateString());
                }

                if (saveInspection(int.Parse(Session["ActiveInspectionPage"].ToString()))) // save the items on the step
                {
                    ArrowGlobalFuncWebCtrls.saveInspection(InspDateToUpdate); // save dates

                    ////Set Dekra Approve DT to 0
                    //string sSQL = "UPDATE " + Session["Library"].ToString() + ".INSPECTION SET ISPTRSAPDT = 0 WHERE ISPNUM = " + Session["ISPNUM"].ToString();
                    //ArrowGlobalFunc.updateDB(sSQL);

                    lblSaveSuccess.Text = "The Inspection has been saved and Notification emails have been sent";
                    lblSaveSuccess.Visible = true;
                    btnAddInspection.Visible = true;
                    btnHome.Visible = true;
                    lblCompleteWarning.Visible = false;

                    wzInspection.FinishCompleteButtonStyle.CssClass = "hideme";

                    LockInspection();

                    Email smtpMail = new Email();
                    StringBuilder emailBody = new StringBuilder();
                    emailBody.Append("<b>Inspection entered or Re-inspection!</b><br><br>");
                    emailBody.Append("Vin: " + txtFullVin.Text.Trim() + "<br>");
                    emailBody.Append("Fleet: " + txtFleet.Text.Trim() + "<br>");
                    emailBody.Append("City: " + txtCity.Text.Trim() + "<br>");
                    emailBody.Append("Location: " + txtLocation.Text.Trim() + "<br>");
                    emailBody.Append("Unit: " + txtUnit.Text.Trim() + "<br>");
                    emailBody.Append("Insp Co: " + Session["uCompName"].ToString() + "<br>");
                    emailBody.Append("Inspector: " + ArrowGlobalFuncWebCtrls.GetInspectorName(int.Parse(Session["uID"].ToString())) + "<br><br>");
                    emailBody.Append("<b>NOTE:</b> This is an automated email. Please do not reply.");

                    string CompIDs = string.Empty;
                    switch (Session["ISPCOMPID"].ToString())
                    {
                        case "1":
                            CompIDs = "1";
                            break;
                        case "2":
                            CompIDs = "2";
                            break;
                        case "3":
                            CompIDs = "3";
                            break;
                    }

                    smtpMail.SendMail(FROM_MAIL, ArrowGlobalFunc.GetEmailAddressesWithMgrs(CompIDs, Session["uID"].ToString()), ISP_COMPLETE, emailBody.ToString(), ArrowStrings.strSMTPserver, ArrowStrings.strSMTPuser, ArrowStrings.strSMTPpwd);
                }
                else
                {
                    sFinalValidationErrMsg = "<br/><br/>There was an error saving the data. ";
                    bWeGood = false;
                }
            }
}

Open in new window

LVL 1
Michael SterlingWeb Applications DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael SterlingWeb Applications DeveloperAuthor Commented:
Figured it out! I was looking in the wrong place, I should've been looking at how to manipulate the existing buttons of the wizard to make them do what I wanted them to do:

            Button b = (Button)wzInspection.FindControl("FinishNavigationTemplateContainerID").FindControl("FinishButton");
            if (b != null)
                b.OnClientClick = "return confirm('WARNING!!...ONLY DO THIS IF YOU REALLY MEAN IT!!!')";
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael SterlingWeb Applications DeveloperAuthor Commented:
Solved by doing my own research.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.