see an example here:Populating Form Inputs Using the Calendar Control
http://aspnet.4guysfromrolla.com/articles/030202-1.aspx
http://aspnet.4guysfromrolla.com/articles/030202-1.aspx
解决方案 »
- ajax的timeout问题
- 关于net的登录相关控件
- Asp.net页面中的Cache块在什么情况下会丢失,如何预防丢失的问题?
- javascript获得对象问题
- 如何使用javascript 调用页面Ajax方法
- 通过Microsoft Visual Studio .NET创建web项目的错误;不能在预先设置好的虚拟目录中创建web项目
- (再给20分解决同样问题!!!!)asp.net中在datagrid中加入图片按钮无法触发事件!!
- 怎么远程连接数据库表
- 急!急!怎么用asp.net2.0(c#)实现与FTP服务器的连接,以及上传下载文件?
- 请介绍一下AOP技术,面向方面编程ASPECT-ORENTIED PROGRAMMING
- 如何定义事件
- TreeView闪烁的问题,如何解决?
<asp:TextBox id="TextBox1" style="Z-INDEX: 103; LEFT: 141px; POSITION: absolute; TOP: 256px" runat="server"></asp:TextBox>
<asp:Panel id="Panel1" style="Z-INDEX: 104; LEFT: 50px; POSITION: absolute; TOP: 291px" runat="server" Visible="False">
<asp:Calendar id="Calendar1" runat="server"></asp:Calendar>
</asp:Panel>**************************************************************************
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
//Button1.Attributes["onclick"] = "<script language='JavaScript'>alert('hi');"+"</script>";
TextBox1.Text = DateTime.Now.ToShortDateString();
} #region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Calendar1.SelectionChanged += new System.EventHandler(this.Calendar1_SelectionChanged);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion private void Button1_Click(object sender, System.EventArgs e)
{
Page.Response.Write("aaaaaaaaaaaa");
} private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();
Panel1.Visible = false;
} private void Button2_Click(object sender, System.EventArgs e)
{
Panel1.Visible = true;
}
{
Calendarnew1.Visible = true;
TextBoxdate.Text = "recv";
} private void Calendarnew1_SelectionChanged(object sender, System.EventArgs e)
{
if (TextBoxdate.Text.Equals("recv"))
TextBoxrecvdate.Text = Calendarnew1.SelectedDate.ToShortDateString();
if (TextBoxdate.Text.Equals("prep"))
TextBoxprepdate.Text = Calendarnew1.SelectedDate.ToShortDateString();
Calendarnew1.Visible = false;
} private void Button_prepdate_Click(object sender, System.EventArgs e)
{
Calendarnew1.Visible = true;
TextBoxdate.Text = "prep";
}