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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.")

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.
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

tangteng78Author Commented:
I'm using with VB codes. I can't find the messagebox method though.

Any advice?
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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. :- )
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.