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

关于ASP.NET定时器的问题

我想每天半夜自动生成静态页面。
怎么实现这个方法。
那位高手知道,请赐教下。
写服务!

怎么写



写服务 开线程 写文件 入数据库

写服务或者用开源的调度框架Quartz.net

建议用后者,后者提供比较灵活的定时设置,优雅的接口设计。并提供cronExpress表达式来设计定时时间

让程序定时执行,用计划任务
也可使用windows服务类
public class 服务类 : System.ServiceProcess.ServiceBase 

private System.Timers.Timer timer1; 
private void InitializeComponent() 

this.timer1 = new System.Timers.Timer(); 
((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit(); 
this.timer1.Interval = 15000; 
this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Elapsed); 

this.ServiceName = "Service1"; 
((System.ComponentModel.ISupportInitialize)(this.timer1)).EndInit(); 






引用
让程序定时执行,用计划任务
也可使用windows服务类
public class 服务类 : System.ServiceProcess.ServiceBase
{
private System.Timers.Timer timer1;
private void InitializeComponent()
{
this.timer1 = new System.Timers.Timer();
((System.ComponentModel.ISupportInitialize)(this.timer1)).BeginInit();
this.timer1.Interval = 15000;
this.timer1.Elapsed += new System.Timers.ElapsedEven


相关问答:

asp.net repeater 控件怎么可以取到子控件的值

asp.net repeater 控件怎么可以取到子控件的值,设置断点在 ItemDataBound 事件怎么没有用的
Request.Form["name"]

楼主你要在把repeater中的 一个属性设置一下才能进入itemdatabound事件

可以 ......

asp.net 线程的问题? - .NET技术 / ASP.NET

前段时间碰到一道面试题如下:
test.aspx页面有如下代码:
 Response.Write(Test.GetDate());
Test类如下:
public class Test
{
  static string dt="";
  public static s ......

帮忙推荐一本ASP.NET的书,谢谢!

比较好的学习asp.net的书推荐一下吧,谢谢~~~
書的話等高人推薦, 我認為多上上www.asp.net對你幫助挺大, 那里有很多視頻, 如果是新手的話, 視& ......

asp.net弹出框问题

在弹出框中点击一个按钮,怎么调转到另一个浏览器,并且在该浏览器打开两个页面
你的意思应该是
response.write("<script>alert('确认'); window.location.href('xxxx.aspx'); </script>"); ......

asp.net验证码问题

HTML code:

<div>
<asp:TextBox runat="server" ID="txt"></asp:TextBox>
<img src="pic.aspx" alt="点击更换图片!" onclick=&quo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号