不知道大家是不是知道,反正是我的新发现。开发环境VS2008
asp.net + VB.netWeb开发中确认窗口一般都是通过javascript或者vbscript在客户端来实现
现在的开发中,我看到别人在服务端直接用MsgBox来弹出消息
aspx代码
<asp:Button ID="Button1" runat="server" Text="Button" />服务端代码
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Response.Write(1)        If MsgBox("OK???", MsgBoxStyle.Question + MsgBoxStyle.YesNoCancel, "Confirm") = MsgBoxResult.Yes Then
            Response.Write(2)
        End If
End Sub以上代码在IE,Safari,Google Chrome下测试通过不知道在C#下怎样调用MsgBox