Question how to show messagebox at aspx?

kinki_2046

Member
Joined
Jun 8, 2011
Messages
23
Programming Experience
Beginner
Dear all,
I hv a problem that when user click a button, then it will prompt out a messagebox for confirmation.

but I use:
messagebox.show("confirm?")

but i fail to do it.

So, how to display a messagebox?


Thanks.


Best regards,
dragon5
 
Dear JohnH,

Izzit aspx does not support the messagebox.show?? just like the windows form application or the php?

I don't want to use the javascript coz user can disable the javascript for the browser.

thanks.
 
Dear JohnH,

Izzit aspx does not support the messagebox.show?? just like the windows form application or the php?

I don't want to use the javascript coz user can disable the javascript for the browser.

thanks.
Yes you can use Messagebox.Show() but the problem is that it shows on the server not in the end user's browser. The only way to show things to the end user is to either put the messaage somewhere on the page, like in a Label with forecolor set to red or something that's highly noticable, or you use Javascript's Alert, Ajax's Model dialog, jQuery's got a few options for displaying things to the user.

You don't want to be locking the threads on the server by using Messagebox.Show() or Msgbox() because there's typically no one logged into the server to acknowledge it & eventually the server will stop responding to web requests which is obviously a bad thing.
 
Back
Top