Solved

How can I send Visual Basic error message to user over internet? MsgBox doesn't Work!

Posted on 2007-11-14
4
240 Views
Last Modified: 2012-08-13
I have developed a user registration system to be used over the internet. It is written in MS VB using MS visual Web Developer. I used MsgBox to send various messages to the user. This worked fine as long as I was in development mode using Ctrl F5 to execute the programs but, when I try to test over the internet, I can't get MsgBox to work. What should I use to send information messages back to the user over the internet?????? The messages are simple such as "Update Successful" and the user needs to know but, I am at a loss for a simple method to send the messages.
0
Comment
Question by:djc916
4 Comments
 
LVL 2

Expert Comment

by:talspaugh27
ID: 20280881
the best way I have always found is to put a javascript function on the page that simply takes in a string and shoots off an alert box containing the string parameter, when it is called so that you can cause it to fire off from the code behind the page.


HTH
Tbone
0
 
LVL 1

Accepted Solution

by:
straucha earned 500 total points
ID: 20291797
'Code
           Dim strmessage2 As String
            strmessage2 = "Please select a Date first"
            'Call separate Class, passing page reference, to register Client Script:
            CreateMessageAlert(Me, strmessage2, "strKey1")

'Seperate Class
        Public Shared 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
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20521803
Forced accept.

Computer101
EE Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question