如何在asp.net中使用Calender控件 [英] how to use Calender control in asp.net
本文介绍了如何在asp.net中使用Calender控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是asp.net的新手
如何在asp.net中使用日历控件
在文本框上点击日历显示并选择日期
该日期将显示在.aspx文件中的文本框控件
I am new in asp.net
how to use calender control in asp.net
on textbox click calender displayed and on selection of date
that date will be displayed in textbox control
推荐答案
in .aspx file
<form id="form1" runat="server">
<div>
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged">
</asp:Calendar>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div>
</form>
< aspx中的
in aspx
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.ToString();
}
或者你可以看到这个好例子
http://www.asp.net/ajaxlibrary/act_Calendar_Simple.ashx [ ^ ]
查看以下链接
http://dotprogramming.blogspot.com/2013/09/how-to-use-calendar-control-in-aspnet.html [ ^ ]
https://ajaxcontroltoolkit.codeplex.com/documentation [ ^ ]
check below links
http://dotprogramming.blogspot.com/2013/09/how-to-use-calendar-control-in-aspnet.html[^]
https://ajaxcontroltoolkit.codeplex.com/documentation[^]
你也可以使用jQuery DatePicker。
见 - JQuery Datepicker示例|使用asp.net textboxl的jQuery日历示例 [ ^ ]
You can also use jQuery DatePicker.
See - JQuery Datepicker Example | jQuery Calendar Example with asp.net textboxl[^]
这篇关于如何在asp.net中使用Calender控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文