Avatar of Scarlett72
Scarlett72

asked on 

Change asp.net calendar control Title programatically

Hi I am trying to change the text of the Title property of a calendar control, I have the initial property set in the .aspx but the only thing that happens when I take it out is that is defaults to current date.

<asp:Calendar ID="Calendar_1" runat="server" VisibleDate="2014-01-01">

Open in new window


As a simple test I have tried the following line in the load event and the DayRender event but it doesn't change:

 
protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
Calendar_1.VisibleDate.AddYears(10);
            }
}

//OR

 protected void DayRender(object sender, DayRenderEventArgs e)
        {           
            Calendar_1.VisibleDate = DateTime.Now.AddYears(10);
}

Open in new window


Any help would be appreciated!
.NET ProgrammingC#

Avatar of undefined
Last Comment
Scarlett72
ASKER CERTIFIED SOLUTION
Avatar of Manoj Patil
Manoj Patil
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Scarlett72
Scarlett72

ASKER

thank you!
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo