Is there a way to trigger a JavaScript alert popup from a VB.net function, other than using RegisterStartupScript? I've only been able to make it work within Page_Load or Page_Prerender so far.
Edit: I have provided more details about my specific situation below.
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