How to popup page from cs file in DotNet

RadhikaTatamuri
RadhikaTatamuri used Ask the Experts™
on
I display the success msg in the same aspx page from cs file......
How to display the same using popup page..Also tell me how to transfer values from my page to that pop up page.....

const String approvedFormat = "<p>Transaction Successful!<br />Transaction ID: {0}<br />Transaction Completed at {1}<br />Customer name: {2}<br />Amount paid: {3}</p>";
            const String declinedMessage = "<p>Transaction Declined.<br />Please check your information and try again.<br />If you believe you have received this message in error,<br />please contact us at your local office.</p>";
            if (approved)
            {
                divSuccessMessage.InnerHtml = String.Format(approvedFormat, authCode, DateTime.Now.ToString(), txtFirstName.Text + " " + txtLastName.Text, txtPayment.Text);
                divSuccessMessage.Visible = true;
               
            }
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Kiran SonawaneProject Lead
Top Expert 2011
Commented:
Try like this

if (approved)
            {
                divSuccessMessage.InnerHtml = String.Format(approvedFormat, authCode, DateTime.Now.ToString(), txtFirstName.Text + " " + txtLastName.Text, txtPayment.Text);
                divSuccessMessage.Visible = true;

      StringBuilder strScript = new StringBuilder();
      strScript.Append("<script language=JavaScript>alert('test')</script>");
      
      RegisterClientScriptBlock("subscribescript", strScript.ToString());

}
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial