[原创]asp.net下的日历控件源代码
2007-12-15 09:31:35 来源:WEB开发网//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.ddl_Text.TextChanged += new System.EventHandler(this.ddl_Text_TextChanged);
this.Calendar1.VisibleMonthChanged += new System.Web.UI.WebControls.MonthChangedEventHandler(this.Calendar1_VisibleMonthChanged);
this.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged);
this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
if(ddl_Text.Text!="")
{
webJSUtil.Alert(this,ddl_Text.Text);
this.ddl_Text.Text="---请选择---";
// webJSUtil.ExecuteClientScriptOnWindowLoad(this,"dropdown(value11)");
}
else
{
webJSUtil.Alert(this,"请选择或输入!");
}
}
private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
ddl_Text.Text=Calendar1.SelectedDate.ToShortDateString();
}
private void Calendar1_VisibleMonthChanged(object sender, System.Web.UI.WebControls.MonthChangedEventArgs e)
{
webJSUtil.ExecuteClientScriptOnWindowLoad(this,"dropdown(value11)");
}
private void ddl_Text_TextChanged(object sender, System.EventArgs e)
{
// webJSUtil.Alert(this,this.ddl_Text.Text);
}
}
}
- ››ASP.NET及JS中的cookie基本用法
- ››ASP.NET获取MS SQL Server安装实例
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
- ››ASP.NET中利用DataList实现图片无缝滚动
- ››ASP.NET验证控件RequiredFieldValidator
- ››ASP.NET中使用System.Net.Mail发邮件
- ››ASP.NET中获取用户控件中控件的ID
- ››ASP.NET中FileBytes写成文件并存档
- ››asp获取毫秒数
- ››asp.net报“INSERT INTO 语句的语法错误解决
更多精彩
赞助商链接