易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 关闭网页代码

2种方法
一、linkbutton的单击事件里关闭页面,拼接代码就是了
补充,不可能,我自己试过,再补充一下
1.关闭时提示“是否关闭”
Response.Write("<script language:javascript>javascript:window.close();</script>");
2.直接关闭不提示
Response.Write("<script language:javascript>javascript:window.opener=null;window.close();</script>");
二、用JavaScript实现
<body>
<a href="#" onClick="windows.opener=null;windows.close();">关闭网页</a>
</body>
用javascript
最大化窗口:
<OBJECT id="max" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Maximize"></OBJECT>
<a href="#1" onclick="max.Click()">最大化</a>
最小化窗口:
<object id=minimize type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Minimize"></object>
<a href="#1" onclick="minimize.Click()">最小化</a>
关闭窗口:
<a href="javascript:window.close()">关闭窗口</a>


相关文档:

asp.net中a控件触发b控件服务器端事件

要实现a控件控件触发b控件服务器端事件,需给a控件添加js脚本,以b控件名义提交页面,具体代码:
var theForm = document.forms['form1'];
theForm.__EVENTTARGET.value = "b"; //触发b控件服务器端方法
theForm.__EVENTARGUMENT.value = "a trigger";//传递的参数
theForm.submit();
注意:需要设置页面属性中的 enab ......

Mix 10 上的asp.net mvc 2的相关Session

Beyond File | New Company: from Cheesy Sample to Social Platform Scott Hanselman in Lagoon L on Monday at 11:30 AM The web has changed and there's a new way of thinking about your applications. You can't just write some HTML and CSS anymore and expect to be the next Twitter. Hear h ......

ASP.net 4.0 针对SEO的改进

搜索引擎优化对任何面向公众的网站来说都非常重要,ASP.net 4.0 为此就做了大量改造。这些改进包括如下:
301
永久性重定向
随着时间的迁移,网站的一些页面地址会发生变化,这会导致搜索引擎收录的链接地址、用户收藏的地址失
效。Response.Redirect() 就是解决这个问题的。但是Response.Redirect 有以下问题:
Respo ......

Online active users counter in ASP.NET


Online active users counter in ASP.NET
With this tool which is written for ASP.NET, it is possible to count the number of online users, members and guest users in web sites.
Installation
The tool installation is very simple and only takes a few minutes.
Step one - Add Reference:
After downlo ......

asp.net准确截取文本长度(取得标题的字符数)

asp.net中自带的CutString只能截取字符数量的长度,但中英文字符数有差异,一个中文字等同于二个英文字符的宽度,这样对截取后的效果不理想.使用以下的方法就能解决.
//调用方法
string title=BLL.CutStr.CutString("标题",10);using System;
using System.Collections.Generic;
using System.Text;
namespace BLL
{
&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号