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

asp.net定时执行代码

string LogPath;
Thread thread;
void WriteLog()
{
while (true)
{
StreamWriter sw = new StreamWriter(LogPath, true, Encoding.UTF8);
sw.WriteLine(thread.Name + ":" + DateTime.Now.ToString());
sw.Close();
Thread.CurrentThread.Join(1000 * 60);//阻止1分钟
}
}
void Application_Start(object sender, EventArgs e)
{
LogPath = HttpContext.Current.Server.MapPath("log.txt");
//在应用程序启动时运行的代码
thread = new Thread(new ThreadStart(WriteLog));
thread.Name = "写登录日志线程";
thread.Start();
}


相关文档:

ASP.NET程序员应用程序域须知

  本文将讨论.NET的应用程序域,并且它们是如何对ASP.NET的执行和调度产生影响的。  
   
    当在Windows中启动Notepad程序时,众所周知程序会执行一个包含在容器内的进程。可以启动多个Notepad的实例,并且每个实例都会在一个专注的进行程运行。使用任务管理器,可以看到在系统中当前运行 ......

ASP.NET中网页倒计时代码

打开一个网页,上面显示5秒钟以后跳转到其他网页,每过一秒,它就会改变(4秒钟以后跳转,3秒钟以后跳转。。。)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head&g ......

ASP.NET 2.0网站优化技巧总结

1. 当不需要使用Session的时候请关闭
        关闭Session当不需要使用的时候
• 若要禁用页的会话状态,请将@ Page 指令中的EnableSessionState 属性设置为false。例如,<%@ Page EnableSessionState="false" %>。
• 注意如果页需要访问会话变量,但不打算创建或修 ......

asp.net 页面中添加普通视频的几种方式

第一种
是通过调用window media player进行播放诸如:wmv,asf等格式文件:
<object align=center class=OBJECT classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 height=320 id=MediaPlayer width=356>
<param name="ShowStatusBar" value="-1">
<param name="Filename" value="电影地址">
& ......

ASP.NET 和 IIS 配置自定义扩展名网页

看过微软的网站有时候,是.MSPX的扩展名?其实你也可以配置,很简单。Here We Go!
配置WEB.CONFIG:
<system.web>
    <compilation>
       <buildProviders>
          <add  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号