Hi,
I used the confirmation in a page when one of the ultrawebgridcell updated.I used the following code.

private void MessageBox(string msg)
    {
        Label lbl = new Label();
        lbl.Text = "<script language='javascript'>" + Environment.NewLine + "window.confirm('" + msg + "')</script>";
        Page.Controls.Add(lbl);
    }
 protected void uwgSelected_UpdateCell(object sender, CellEventArgs e)
    {
           MessageBox("Continue or Not");
           empDtls.employeedetails(0, dEmpId, sName, sGender, dtDOB, 0, "", 0, 0, 0, 0, 0, 0, 0, iDesgnId, dtime, 0, ideptId, 0, 0, "", "", "", "", 0, "",0);
                    cvselected.fCVSelected(0, 0, iCVId, srefNo, 0, dtime, dtime, "", 0, dtime, "", "",dEmpId);
     }

I want to gte the result of confirmation for further processing.
The codes after the Messagebox calling, executes only if the confirmation messga is true.
How can I implement it.
Thanks in advance.

dont create your confirm box script that way, just add it to your page between script tags, and while rendering the grid, add that function name along with the message parameter to grid cells' onclick attribute.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.