用客户端脚本Javascript的window.alert()方法。--------------------------------
AspNetPager 免费分页控件4.1版发布,欢迎下载使用:http://www.webdiyer.com

解决方案 »

  1.   

    我想在aspx.vb中用msgbox,window.alert的话只能在脚本中用吧
      

  2.   

    在aspx.vb中不能用msgbox,用了沒用的,你可以用Reponse.Write ("調試的內容")
      

  3.   

    <asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 297px; POSITION: absolute; TOP: 238px" runat="server" Text="Button"></asp:Button>void Page_Load(Object o,EventArgs e)
    {
       Button1.Attributes .Add ("onclick","javascript:window.alert('show me your xxxx!')");
    }
      

  4.   

    你可以用messagebox.show方法
    但是你必须应用到第5个参数中的最上面的哪个
    namespace:system.window.forms
      

  5.   

    因为在vb.net中虽然也响应msgbox但是最好用messagebox.show
      

  6.   

    在客户端脚本Javascript里msgbox(...)多简单,调试的话,下断点省事。
      

  7.   

    多谢各位
    我很菜,请问messagebox.show怎么用?
      

  8.   

    在你的项目中添加引用:System.Wimdows.Forms调用MessageBox.Show 方法  ,在指定对象的前面显示具有指定文本、标题、按钮、图标、默认按钮和选项的消息框。参数如下:[Visual Basic]
    Overloads Public Shared Function Show( _
      ByVal owner As IWin32Window, _
       ByVal text As String, _
       ByVal caption As String, _
       ByVal buttons As MessageBoxButtons, _
       ByVal icon As MessageBoxIcon, _
       ByVal defaultButton As MessageBoxDefaultButton, _
       ByVal options As MessageBoxOptions _
    ) As DialogResult参数:
    owner 
    IWin32Window,消息框将显示在其前面。 
    text 
    要在消息框中显示的文本。 
    caption 
    要在消息框的标题栏中显示的文本。 
    buttons 
    MessageBoxButtons 值之一,它指定在消息框中显示哪些按钮。 
    icon 
    MessageBoxIcon 值之一,它指定在消息框中显示哪个图标。 
    defaultButton 
    MessageBoxDefaultButton 值之一,它指定消息框的默认按钮。 
    options 
    MessageBoxOptions 值之一,它指定将用于消息框的显示和关联选项。注意:
    MessageBoxOptions 值要选择Windows.Forms.MessageBoxOptions.ServiceNotification,否则会报错。