title: Script Message Box in asp.net
body: <p>i have the following function:</p>
  
  <pre><code>  Public Function javaMsg(ByVal message As String) As String
  
      Dim sb As New System.Text.StringBuilder()
      sb.Append("window.onload=function(){")
      sb.Append("alert('")
      sb.Append(message)
      sb.Append("')};")
  
      Return sb.ToString()
  
  End Function
  </code></pre>
  
  <p>that's how i'm calling my function:</p>
  
  <pre><code>Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", x.javaMsg("Do you want to choose a date?"), True)
  </code></pre>
  
  <p>this alert only shows an ok button how can i add a cancel button? and how can i use every button on click to do a certain job?</p>
  
  <p>note that i'm using asp.net with vb.net</p>