This documentation is archived and is not being maintained.

Calendar.SelectWeekText Property

Gets or sets the text displayed for the week selection element in the selector column.

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

Property Value

The text displayed for the week selection element in the selector column. The default value is ">", which renders as a greater than sign (>).

Remarks

Use the SelectWeekText property to provide custom text for the week selection element in the selector column.

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 SelectWeekText 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 SelectionMode property is set to CalendarSelectionMode.DayWeek or CalendarSelectionMode.DayWeekMonth.

Example

[Visual Basic, C#, JScript] The following example demonstrates how to use the SelectWeekText property to provide custom text for the week selection element.

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

</head>
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      <asp:Calendar id="calendar1" runat="server"
           SelectionMode="DayWeekMonth"
           SelectMonthText="&lt;*&gt;"
           SelectWeekText="-&gt;"/>
            
   </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"
           SelectionMode="DayWeekMonth"
           SelectMonthText="&lt;*&gt;"
           SelectWeekText="-&gt;"/>
            
   </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"
           SelectionMode="DayWeekMonth"
           SelectMonthText="&lt;*&gt;"
           SelectWeekText="-&gt;"/>
            
   </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 | SelectionMode

Show: