在ASP.NET中用C#语言编写事物提醒~~~~~~~~[在线等]

renxiuli1234 2009-05-06 01:52:22
一个text框中输入文字,几个Radiobutton用来选择时间.当我从一个Radiobutton中选择一个时间值时,比如选2点 时,单击button按钮,当到2点时会弹出一个对话框显示text框中的内容。

请简单点好,我是出学者~~~~~~~
...全文
77 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jimmy_jpy 2009-05-06
  • 打赏
  • 举报
回复
用定时吧
renxiuli1234 2009-05-06
  • 打赏
  • 举报
回复
c#还没学好呢,又要学JS?高手们可以说的复杂点么?别那么简单
ViewStates 2009-05-06
  • 打赏
  • 举报
回复
1楼的是WINFORM的
你那个光C#无法完成。你打开页面后你页面的生命周期已经结束了。
用JS实现吧
SETINTERVAL(FUNCTION(){...},1000);
renxiuli1234 2009-05-06
  • 打赏
  • 举报
回复
timer 事件在哪?我用VS2005生成了一个网站,在里面看不到timer
littleantant 2009-05-06
  • 打赏
  • 举报
回复
用form.timer就可以了。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Alert alert;


private void timer1_Tick(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
if (DateTime.Now.ToString() == "2009-5-6 02:00:00")
{
if (alert == null)
{
alert = new Alert(this.textBox1);
alert.ShowDialog();
timer1.Enabled = false;
}
}
}
}

private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Start();
}
}
}


public Alert(TextBox te)
{
InitializeComponent();
this.text = te;
this.textBox1.Text = te.Text;
}

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧