Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Calendar.SelectorStyle Property

Gets the style properties for the week and month selector column.

[Visual Basic]
Public ReadOnly Property SelectorStyle As TableItemStyle
[C#]
public TableItemStyle SelectorStyle {get;}
[C++]
public: __property TableItemStyle* get_SelectorStyle();
[JScript]
public function get SelectorStyle() : TableItemStyle;

Property Value

A TableItemStyle that contains the style properties for the week and month selector column. The default value is an empty TableItemStyle object.

Remarks

Use this property to specify the style for the week and month selector column. For additional information on the different style properties that can be controlled, see TableItemStyle.

The SelectorStyle property only applies when the SelectionMode property is set to CalendarSelectionMode.DayWeek or CalendarSelectionMode.DayWeekMonth.

Example

[Visual Basic, C#, JScript] The following example demonstrates how to use the SelectorStyle property to specify a light gray background color for the selector column.

[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;"/>

         <SelectorStyle BackColor="LightGray">
         </SelectorStyle>

      </asp:Calendar>
 
   </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;"/>

         <SelectorStyle BackColor="LightGray">
         </SelectorStyle>

      </asp:Calendar>
 
   </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;"/>

         <SelectorStyle BackColor="LightGray">
         </SelectorStyle>

      </asp:Calendar>
 
   </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 | TableItemStyle

Show:
© 2015 Microsoft