0

Anyone know on how to do buffer before I proceed to response.redirect to another page?

Below is the sample code that I've done.

Dim msg = String.Format("<script language='javascript'>alert('Payment Success');</script>")
context.Response.Write(msg)
context.Response.Redirect("Index.aspx")
Supriya
  • 290
  • 4
  • 15

1 Answers1

0

It is necessary to do redirection in javascript.

Dim msg = String.Format("<script language='javascript'>alert('Payment Success');
 window.location.replace('Index.aspx'); </script>")
context.Response.Write(msg)

Alternatively you can use window.location.href='Index.aspx' (see How do I redirect to another webpage?)

IvanH
  • 5,039
  • 14
  • 60
  • 81