Solved

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

Posted on 2007-11-14
4
236 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now