Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Exit Sub in an Update Panel

$
0
0

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


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>