I want to run a javascript alert popup inside a VB.net function. I have used something like this before, but I have only gotten it to work inside Page_Load or Page_Prerender. Is there something other than RegisterStartupScript that is used for my scenario?
edit: I added more detail as to what my situation is.
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click
blnEditComplete = RunEditChecks()
End Sub
Function RunEditChecks() as Boolean
'edit checks
...
...
...
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType, "warning", "alert('WARNING: Price must equal Contract Price.');", True)
...
...
Return True
End Function