vb.net编asp.net web application,用msgbox时,出错:
在应用程序未以 UserInteractive 模式运行的情况下显示有模式对话框或窗体是无效的操作。请指定 ServiceNotification 或 DefaultDesktopOnly 样式,以显示服务应用程序发出的通知。 那么应该怎么设ServiceNotification 或DefaultDesktopOnly ,怎么用语句写呢? 另外,尝试用 Response.Write("<Script language='VBScript'>Msgbox('先生,您好!')</script>"),怎么老说语法错呢 最后问一下:怎么asp.net web application编程下,messagebox它不认,老说未声明呢
alert("MessageBox");
</script>
javascript可以在ie和网景中运行,但vbscript在网景中不支持。
编辑器认为"先生,您好!"是变量,说“未声明”!
Response.Write("<Script language='VBScript'>Msgbox(\"先生,您好!\")</script>");
Response.Write("<script language='javascript'>alert('登录成功!');</script>");
一般用Js配合实现客户端功能。