NextPrevFormat 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
Calendar내의 이전 및 다음 달 탐색 컨트롤의 표시 형식을 나타냅니다.
public enum class NextPrevFormat
public enum NextPrevFormat
type NextPrevFormat =
Public Enum NextPrevFormat
- 상속
필드
| Name | 값 | Description |
|---|---|---|
| CustomText | 0 | 에 대한 월 탐색 컨트롤에 대한 사용자 지정 텍스트 형식입니다 Calendar. |
| ShortMonth | 1 | 에 대한 월 탐색 컨트롤 Calendar의 약어 월 이름 형식입니다. 예를 들어 "Jan"입니다. |
| FullMonth | 2 | 의 월 탐색 컨트롤에 대한 전체 월 이름 형식입니다 Calendar. 예를 들어 "January"입니다. |
예제
<%@ 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" >
<script runat="server" >
void Selection_Change(Object sender, EventArgs e)
{
// Set the format for the next and previous month controls.
Calendar1.NextPrevFormat = (NextPrevFormat)DayList.SelectedIndex;
}
</script>
<head runat="server">
<title> Calendar NextPrevFormat Example </title>
</head>
<body>
<form id="form1" runat="server">
<h3> Calendar NextPrevFormat Example </h3>
Select a format for the next and previous month controls.
<br /><br />
<asp:Calendar id="Calendar1"
ShowGridLines="True"
ShowTitle="True"
runat="server"/>
<br /><br />
<table cellpadding="5">
<tr>
<td>
Format:
</td>
</tr>
<tr>
<td>
<asp:DropDownList id="DayList"
AutoPostBack="True"
OnSelectedIndexChanged="Selection_Change"
runat="server">
<asp:ListItem Selected="True"> Custom </asp:ListItem>
<asp:ListItem> ShortMonth </asp:ListItem>
<asp:ListItem> FullMonth </asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</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" >
<script runat="server" >
Sub Selection_Change(sender As Object, e As EventArgs)
' Set the format for the next and previous month controls.
Calendar1.NextPrevFormat = _
CType(DayList.SelectedIndex, NextPrevFormat)
End Sub
</script>
<head runat="server">
<title> Calendar NextPrevFormat Example </title>
</head>
<body>
<form id="form1" runat="server">
<h3> Calendar NextPrevFormat Example </h3>
Select a format for the next and previous month controls.
<br /><br />
<asp:Calendar id="Calendar1"
ShowGridLines="True"
ShowTitle="True"
runat="server"/>
<br /><br />
<table cellpadding="5">
<tr>
<td>
Format:
</td>
</tr>
<tr>
<td>
<asp:DropDownList id="DayList"
AutoPostBack="True"
OnSelectedIndexChanged="Selection_Change"
runat="server">
<asp:ListItem Selected="True"> Custom </asp:ListItem>
<asp:ListItem> ShortMonth </asp:ListItem>
<asp:ListItem> FullMonth </asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</form>
</body>
</html>
설명
열거형은 NextPrevFormat 다음 달 및 이전 달 단추 Calendar의 다른 스타일을 나타냅니다.
CustomText를 사용하면 프로그래머가 탐색 컨트롤에 대한 사용자 지정 텍스트를 지정할 수 있습니다.
ShortMonth는 해당 월에 대한 세 글자 약어를 표시합니다.
FullMonth는 전체 월 이름을 표시합니다.