TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ToBe
NA
164
94.4k
textbox is not reading the new selection of calendar
May 9 2013 4:31 AM
hi
I have problem with the textbox reading from a calendar
I to make the default value for the textbox is the system date which is working now in my code and when the user click the button to change it it should save the selected date in the textbox value and hide the calendar but it's not taking it .
this is my code :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DateTime today = DateTime.Today;
Calendar1.TodaysDate = today;
Calendar1.SelectedDate = Calendar1.TodaysDate;
TextBox1.Text = Calendar1.SelectedDate.Date.ToString();
Calendar1.Visible = false;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Calendar1.Visible == true)
{
TextBox1.Text = Calendar1.SelectedDate.Date.ToString();
Calendar1.Visible = false;
}
else
{
Calendar1.Visible = true;
}
}
}
}
Reply
Answers (
2
)
Controls is not working probably !
C program that reads in two words, should be readable.