Solved

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

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…
Suggested Courses

630 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