Solved

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

Posted on 2007-11-14
4
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

763 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