How to popup message besides msgbox?

I know that on actual server, using the msgbox (vb) popup to prompt user doesn't work.

Is there any workaround?

PS: THe code below shows where i use the msgbox in my development localhost machine.
            'Get the usercontrol object
            Dim PhotoMedia As PhotoMedia = sender
            Dim c As String() = Regex.Split(PhotoMedia.ID.ToString, "PhotoMedia")
            Dim obj As Object = PhotoMedia.FindControl("imgUploadPhoto")
            Dim txtImgDescription As TextBox = PhotoMedia.FindControl("txtImgDescription")
            '#TIPS: The class can return true if database update sucessful.
            objMenu.PhotoMediaSaveDesc(Nothing, Session("menu_info_id"), Nothing, txtImgDescription.Text, CInt(c(1).ToString))
            MsgBox("Description Saved!")   '-> ANY WORKAROUND TO REPLACE MSGBOX??
        Catch ex As Exception
            'Log the error details then redirect to generic error page.
            ExError.LogError(Path.GetFileName(Request.FilePath), System.Reflection.MethodBase.GetCurrentMethod().Name, ex)
        End Try

Open in new window

Who is Participating?
barrislbConnect With a Mentor Commented:
Hi tangteng,

Try: imports System.Windows.Forms in your module or class module, if it's not already there. Then you'll be able to use the messagebox method. The messagebox method is pre-loaded when adding any WinForm to a VB.Net project, but it's not pre-loaded when using raw classes. You would have to import the System.Windows.Form into your class module, if that's your case? I hope this is some help to your need.
How about using some Javascript in your Code
Response.Write("<script>alert('You have successfully updated the record!');</script>")

Open in new window

Try this"Description Saved.")

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

In you have two options:

1) Is to use the traditional msgbox.
2) or to use the MESSAGEBOX.


msgbox is different from messagebox.

because msgbox is the carry over of the old vb while the messagebox is a class that is shpped with .net.
tangteng78Author Commented:
I'm using with VB codes. I can't find the messagebox method though.

Any advice?
Hi Tangteg,

Have you tried my method?

Response.Write("<script>alert('You have successfully updated the record!');</script>")
tangteng78Author Commented:
That works. But i'm just curios, if a user using a non-window system to browse my webpage, can the popup window (messageshow) still works?
Hi tangteng78,

I'm glad to know that you were able to get your messagebox to display. Your question to whether "a user using a non-window system could browse your webpage," and get your popup message is  a good question? I don't develop websites per say to give you a concrete answer, but I would assume that if you are using ASP.Net to develop your webpage, or website that you should be alright. As long as the individuals that's using the non-windows system have a browser that could display your webpage.

Mozilla Firefox, Google Chrome, and now Safari can display ASP.Net websites nicely! That I know of. Those browsers are none microsoft. I would download each of those browsers, if you haven't already? And test, test, test. Have other users as you stated in your last post to test your webpage on other OSs outside of windows. Other experts may have a better answer than mine. :- )
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.