Calender control in asp.net
-
Hi all, How to use a textbox control along with a calender control in asp.net codebehind is C#. onclick of the calender's particular date the day/month/year should be put in the 3 textbox respectively?. How to code for this. On server side or client side. because i want that dates comparison also. thanks in advance
-
Hi all, How to use a textbox control along with a calender control in asp.net codebehind is C#. onclick of the calender's particular date the day/month/year should be put in the 3 textbox respectively?. How to code for this. On server side or client side. because i want that dates comparison also. thanks in advance
hi, Let me first clarify what I have understood from your requirement... You have a calender control on the web page and 3 textboxes. When the user selects a date the day month and year component should get displayed in the 3 text boxes... If this is so... then herez the code... private void CalMain_SelectionChanged(object sender, System.EventArgs e) { DateTime selDate = ((Calendar)sender).SelectedDate; txt1.Text = selDate.Day.ToString(); txt2.Text = selDate.Month.ToString(); txt3.Text = selDate.Year.ToString(); } Note : This code is server side. regards, Aryadip. Cheers !! and have a Funky day !!
-
hi, Let me first clarify what I have understood from your requirement... You have a calender control on the web page and 3 textboxes. When the user selects a date the day month and year component should get displayed in the 3 text boxes... If this is so... then herez the code... private void CalMain_SelectionChanged(object sender, System.EventArgs e) { DateTime selDate = ((Calendar)sender).SelectedDate; txt1.Text = selDate.Day.ToString(); txt2.Text = selDate.Month.ToString(); txt3.Text = selDate.Year.ToString(); } Note : This code is server side. regards, Aryadip. Cheers !! and have a Funky day !!