How to show MessageBox on asp.net?

前端 未结 9 1699
悲&欢浪女
悲&欢浪女 2020-12-10 15:21

if I need to show a MessageBox on my ASP.NET WebForm, how to do it?

I try: Messagebox.show(\"dd\");

But it\'s not working.

9条回答
  •  执笔经年
    2020-12-10 15:38

    It's true that Messagebox.show("dd"); is not a part of using System.Web;,

    I felt the same situation for most of time. If you want to do this then do the following steps.

    • Right click on project in solution explorer
    • go for add reference, then choose .NET tab

    • And select, System.windows.forms (press 's' to find quickly)

    u can get the namespace, now u can use Messagebox.show("dd");

    But I recommend to go with javascript alert for this.

提交回复
热议问题