1个关于msgbox的菜问题 用客户端脚本Javascript的window.alert()方法。--------------------------------AspNetPager 免费分页控件4.1版发布,欢迎下载使用:http://www.webdiyer.com 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我想在aspx.vb中用msgbox,window.alert的话只能在脚本中用吧 在aspx.vb中不能用msgbox,用了沒用的,你可以用Reponse.Write ("調試的內容") <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!')");} 你可以用messagebox.show方法但是你必须应用到第5个参数中的最上面的哪个namespace:system.window.forms 因为在vb.net中虽然也响应msgbox但是最好用messagebox.show 在客户端脚本Javascript里msgbox(...)多简单,调试的话,下断点省事。 多谢各位我很菜,请问messagebox.show怎么用? 在你的项目中添加引用: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,否则会报错。 求文本框不能输入单引号和空格正则表达式 怎么让一个DIV固定在网页下面,我的高度和宽度设置的是百分比 用Grid View与Form View组合,向数据库插入新记录出错 asp.net如何随意增删行,批量添加数据? 大家看过dvbbs的.net版本大家有看过吗?我下了一个研究,但是发现它的cs文件和aspx文件怎么都不在一个文件夹内? net_lover 幫幫忙吧,沒分了。。 急,急,急,十万火急,谢谢! ******** 请问.bak文件(数据库备份文件)怎么弄到数据库里去? 控件问题 急救!!!50分。 请问CLR公共语言运行时是什么意思? datagrid的怪问题,请赐教!
{
Button1.Attributes .Add ("onclick","javascript:window.alert('show me your xxxx!')");
}
但是你必须应用到第5个参数中的最上面的哪个
namespace:system.window.forms
我很菜,请问messagebox.show怎么用?
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,否则会报错。