Need to add a button for next previous year in ASP calendar control dynamically.
How can I add it right next to the existing next and prev controls? Is it possible to do this via dayrender event ?? Please help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you cannot modify the existing calendar easily. But maybe it’s sufficient to ad a table-row above the calendar where you can select the year.
Here are two methods to populate the year- and month-dropdownlists:
You can initialize the lists from
Page_Load:and finally, here’s the event handler for the
SelectedIndexChangedevent for bothDropDownListswhich sets the newDate:[ tested ]
Inspired by: https://web.archive.org/web/20210304123649/https://www.4guysfromrolla.com/articles/090104-1.aspx (VB)