Redigeeri

Jagamisviis:


Calendar.NextMonthText Property

Definition

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

public:
 property System::String ^ NextMonthText { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public string NextMonthText { get; set; }
public string NextMonthText { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.NextMonthText : string with get, set
member this.NextMonthText : string with get, set
Public Property NextMonthText As String

Property Value

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

Attributes

Examples

The following code example demonstrates how to use the NextMonthText property to specify custom text for the navigation control to the next month.

<%@ Page Language="C#" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Calendar Example</title>
</head>
<body>

   <form id="form1" runat="server">

      <h3>Calendar Example</h3>

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

</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Calendar Example</title>
</head>
<body>

   <form id="form1" runat="server">

      <h3>Calendar Example</h3>

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

</body>
</html>

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 &gt;.

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 applies only if the ShowNextPrevMonth property is set to true.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

Applies to

See also