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

asp.net 中实现页面每隔一分钟刷新一次的效果

在Global.asax
需要回顾的知识点是 线程 和  文本文件的读写。
<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
    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);
        }
    }
    void Application_Start(object sender, EventArgs e)
    {
        // 在应用程序启动时运行的代码
  
        logpath = HttpContext.Current.Server.MapPath("log.txt");
        thread = new Thread(new ThreadStart(writelog));
        thread.Name = "写入登陆日志线程";
        thread.Start();
       
    }
   
    void Application_End(object sender, EventArgs e)
    {
        //  在应用程序关闭时运行的代码
     
    }
       
    void Application_Error(object sender, EventArgs e)
    {
        // 在出现未


相关文档:

ASP.NET页面刷新方法总结

第一:
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二:
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.location.href=document.URL; < /script&g ......

ASP.NET页面刷新的实现方法

先看看ASP.NET页面刷新的实现方法:
第一:
C# codeprivate void Button1_Click( object sender, System.EventArgs e )
{
  Response.Redirect( Request.Url.ToString( ) );
}
第二:
C# codeprivate void Button2_Click( object sender, System.EventArgs e )
{
Response.Write( " < script lan ......

ASP.NET MVC 系列文章

http://www.cnblogs.com/chsword/archive/2008/03/10/dotnetmvcframework.html
以下文章属于ASP.NET MVC 1.0 正式版
ASP.NET MVC雕虫小技 1-2
ASP.NET MVC 重点教程一周年版 第十一回 母版页、用户自定义控件及文件上传
ASP.NET MVC 重点教程一周年版 第十回 请求Controller
ASP.NET MVC 重点教程一周年版 第九回 H ......

Asp.net中动态在中加入Scrpit标签

许久以前,写过一篇《asp.net页中动态加入样式表文件》,后来发现在使用时如果每页都写这么个函数真是很麻烦,于是自己写了一个Page的派生。将这个函数加了进去。
      /**//// <summary>
    /// 作者 邹健
    ///  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号