here's how i use RegisterStartupScript to do popups. RegisterStartupScript's significance is only making sure the alert doesn't appear twice. there's design concerns you'll become aware of while trying popups, such as the back button will make the messages pop up again, but this should get you started.
Public Sub CreateMessageAlert(ByRef aspxPage As System.Web.UI.Page, _
ByVal strMessage As String, ByVal strKey As String)
Dim strScript As String = "<script language=JavaScript>alert('" _
& strMessage & "')</script>"
If (Not aspxPage.IsStartupScriptRegistered(strKey)) Then
aspxPage.RegisterStartupScript(strKey, strScript)
End If
End Sub
useage from within an aspx:
CreateMessageAlert(me, "Page Successfully Updated!", "yesUpdtMsg")