This is with ASP.NET VB. I use a message box and Exit Sub to stop a calculation with missing data.
Public Sub MsgBox(ByVal Message As String)
System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("</SCRIPT>")
End Sub
If Val(txtSalesPrice.Text) = 0 Or Val(txtIntRate.Text) = 0 Then
MsgBox("Please enter a sales price and an interest rate.")
Exit Sub
End If
This works until I add an Update Panel. Then neither the message box or the Exit Sub work inside the Update Panel.
Any ideas about this?
Thanks,
Carthalion