Hi
I want to display 1 textbox & a calendar . User should select date from calendar & that value is stored in textbox .
Thanks
Textbox with a Calendar
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Apr 3, 2012, 6:17 AM EDT
Place this in the .aspx page.
Code File:
MuthuMari MRank #5,738 · 288 reputationPosted Apr 5, 2012, 1:13 AM EDT
aspx
in cs file.
if (!IsPostBack)
{
TextBox1.Text = Calendar1.TodaysDate.Date.ToShortDateString();
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.Date.ToShortDateString();
}
Thanks.
If this post is useful then mark it as "Accepted Answer"