Calendar.HasWeekSelectors Method
.NET Framework 3.0
This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Determines whether a CalendarSelectionMode object contains week selectors.
Namespace: System.Web.UI.WebControlsAssembly: System.Web (in system.web.dll)
protected boolean HasWeekSelectors ( CalendarSelectionMode selectionMode )
protected function HasWeekSelectors ( selectionMode : CalendarSelectionMode ) : boolean
Not applicable.
Parameters
- selectionMode
One of the CalendarSelectionMode values.
Return Value
true if the CalendarSelectionMode contains week selectors; otherwise, false.The following code example demonstrates how to determine the value of the HasWeekSelectors property in a custom Calendar control.
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.JSL.Controls" Assembly="Samples.AspNet.JSL" %>
<%@ Page language="VJ#" %>
<!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>Custom Calendar - HasWeekSelectors - VJ# Example</title>
</head>
<body>
<form id="Form1" method="post" runat="server">
<h3>Custom Calendar - HasWeekSelectors - VJ# Example</h3>
<aspSample:CustomCalendarHasWeekSelectors
id="Calendar1"
runat="server" />
</form>
</body>
</html>
package Samples.AspNet.JSL.Controls;
public class CustomCalendarHasWeekSelectors
extends System.Web.UI.WebControls.Calendar
{
protected void OnPreRender(System.EventArgs e)
{
// Determine if a CalendarSelectionMode.DayWeek contains WeekSelectors.
boolean hasWeekSelectors = this.HasWeekSelectors(
System.Web.UI.WebControls.CalendarSelectionMode.DayWeek);
// Call the base's OnPreRender method.
super.OnPreRender(e);
} //OnPreRender
} //CustomCalendarHasWeekSelectors
Community Additions
ADD
Show: