ASP.Net日历帮助。 [英] ASP.Net Calender Help.
本文介绍了ASP.Net日历帮助。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有2个包含开始数据和结束日期的文本框。第一个文本应该按用户显示日期键,第二个文本框应该在用户输入第一个文本框时显示默认增加1年的日期...任何帮助....真的很感激.....
问候。
解决方案
日期是在第一个cal中选择,你可以添加一天并分配给另一个cal。
嘿家伙找到解决方案.......
TextBox1.Text = Calendar2.SelectedDate.ToString(dd-MMM-yyyy);
DateTime currentDate;
currentDate = Convert.ToDateTime(TextBox1.Text);
TextBox2.Text = currentDate。 AddYears(1)的ToString( DD / MM / YYYY);
Hi Guys,
I have 2 text boxes with start data and end date. The first text should display key in date by user and second text box should display the date incremented by 1 year by default once user enters the first textbox...Any help....really appreciated.....
Regards.
解决方案
Whe date is selected in first cal, you can add a day and assign to another cal.
Hey guys found the solution.......
TextBox1.Text = Calendar2.SelectedDate.ToString("dd-MMM-yyyy");
DateTime currentDate;
currentDate = Convert.ToDateTime(TextBox1.Text);
TextBox2.Text = currentDate.AddYears(1).ToString("dd/MM/yyyy");
这篇关于ASP.Net日历帮助。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文