This documentation is archived and is not being maintained.

Calendar.NextMonthText Property

Gets or sets the text displayed for the next month navigation control.

[Visual Basic]
Public Property NextMonthText As String
[C#]
public string NextMonthText {get; set;}
[C++]
public: __property String* get_NextMonthText();
public: __property void set_NextMonthText(String*);
[JScript]
public function get NextMonthText() : String;
public function set NextMonthText(String);

Property Value

The caption text for the next month navigation control. The default value is ">", which renders as the greater than sign (>).

Remarks

Use the NextMonthText property to provide custom text for the next month navigation control. This property is commonly used along with the PrevMonthText property to provide a custom set of navigation controls.

Note   This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >.

Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the NextMonthText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.

This property only applies if the ShowNextPrevMonth property is set to true.

Example

[Visual Basic, C#, JScript] The following example demonstrates how to use the NextMonthText property to specify custom text for the navigation control to the next month.

[Visual Basic] 
<%@ Page Language="VB" AutoEventWireup="True" %>
<html>
<head>

</head>
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      <asp:Calendar id="calendar1" runat="server"
           NextMonthText="Next"
           PrevMonthText="Prev"/>
            
   </form>
        

</body>
</html>


[C#] 
<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
<head>

</head>
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      <asp:Calendar id="calendar1" runat="server"
           NextMonthText="Next"
           PrevMonthText="Prev"/>
            
   </form>
        

</body>
</html>


[JScript] 
<%@ Page Language="JScript" AutoEventWireup="True" %>
<html>
<head>

</head>
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      <asp:Calendar id="calendar1" runat="server"
           NextMonthText="Next"
           PrevMonthText="Prev"/>
            
   </form>
        

</body>
</html>

[C++] No example is available for C++. To view a Visual Basic, C#, or JScript example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Calendar Class | Calendar Members | System.Web.UI.WebControls Namespace | ShowNextPrevMonth | PrevMonthText

Show: