不用api也可以实现
Response.Write(@"<script language=javascript>window.open('XXX.aspx','_blank','left='+(screen.width/2-300)+',top='+(screen.height/2-235)+',toolbar=yes,titlebar=no,status=no,location=no,resizable=no,width=600,height=470','')</script>");
Response.Write(@"<script language=javascript>window.open('XXX.aspx','_blank','left='+(screen.width/2-300)+',top='+(screen.height/2-235)+',toolbar=yes,titlebar=no,status=no,location=no,resizable=no,width=600,height=470','')</script>");
解决方案 »
- OleDbDataReader分页
- 明明等于""为什么还会说不等于空语句里面出错
- 关于ASP.NET开发网站的话如何去关于屏幕分辨率的问题来布局所有页面?
- Jquery getjson如何判断bool值呢?
- Asp.Net MVC js直接执行Controller的问题
- 大家帮忙,看我这样写为什么不能得到正确结果?
- 类里中怎么使用Page.RegisterStartupScript?
- 哪位老大能够在webgrid中添加自定义的摸板列阿?
- DataGrid的DataSource在每次提交以后都成了null,如何保存住DataSource呢?
- 帮写个正则
- 请问怎样在页面上保存一个动态生成的控件
- 求教高手及牛人
因为Web程序,如果能做到这点,那可真是可怕了,
你想,Web程序单纯修改注册表等就会给客户端带来那么大的安全问题,如果还能调用客户端的Windows API,那可爽了恶意网站了
所以,我想处于安全目的,MS也不会提供这样的实现的。
接着添加下面的代码来声明一个API: [ DllImport("User32.dll") ] public static extern int MessageBox(int h, string m, string c, int type);