Calling VB.net button click event from javascript confirm box
<p>Is there any way to call a vb.net button on click event from java script confirm box when the user clicks ok. </p>

<pre><code>                    Dim sb As New System.Text.StringBuilder()
                    sb.Append("&lt;script type = 'text/javascript'&gt;")
                    sb.Append("window.onload=function(){")
                    sb.Append("if (confirm('")
                    sb.Append(message)

                    sb.Append("')){ ") //btn Click event


                    sb.Append("}")
                    sb.Append("else{")
                    sb.Append("window.location = 'SA.aspx?PID=" &amp; Request("PID") &amp; "';")
                    sb.Append("}};&lt;/script&gt;")
                    ClientScript.RegisterClientScriptBlock(Me.GetType(), "confirm", sb.ToString())
</code></pre>
