I am new to C# is know some visual basic but I don’t know C#. Now my question is I have a monthly calendar on my page and when someone selects the date and hits the submit button the date should appear in the label to the right. Here is a part of my code:
private void button1_Click(object sender, EventArgs e)
{
label6.Text = monthCalendar1.Text;
}
private void label6_Click(object sender, EventArgs e)
{
label6.Text = monthCalendar1.SelectionStart.ToShortDateString();
}
I am not understanding why it is not working.
Edit: What is not working is the label for the calendar when the user picks a date and click the submit button the date should go over to the label.
I have been here answering question and all i am asking is for someone to help me understand what I am doing wrong. And you guys want to down vote me..
Things we need to know:
label6is.My research:
monthCalendar1is likelySystem.Windows.Forms.MonthCalendar.MonthCalendar.SelectionStartshould be valid at any time, as long as it’s betweenMinDateandMaxDate. What I don’t get is if the label is your garden variety, why wouldn’t the label show?Other note: If there’s a button to change the label, there’s no point having a click handler on the label, and vice versa.