Calendar.DayNameFormat 속성

정의

요일의 이름 형식을 가져오거나 설정합니다.

public:
 property System::Web::UI::WebControls::DayNameFormat DayNameFormat { System::Web::UI::WebControls::DayNameFormat get(); void set(System::Web::UI::WebControls::DayNameFormat value); };
[System.ComponentModel.Bindable(true)]
public System.Web.UI.WebControls.DayNameFormat DayNameFormat { get; set; }
public System.Web.UI.WebControls.DayNameFormat DayNameFormat { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.DayNameFormat : System.Web.UI.WebControls.DayNameFormat with get, set
member this.DayNameFormat : System.Web.UI.WebControls.DayNameFormat with get, set
Public Property DayNameFormat As DayNameFormat

속성 값

DayNameFormat

DayNameFormat 값 중 하나입니다. 기본값은 Short입니다.

특성

예외

지정한 요일 이름 형식이 DayNameFormat 값이 아닌 경우

예제

다음 코드 예제에서는 속성을 사용 하 여 DayNameFormat 요일 전체 표시 되도록 지정 하는 방법을 보여 줍니다.

<%@ 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"
           ShowDayHeader="True"
           DayNameFormat="Full"/>
            
   </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"
           ShowDayHeader="True"
           DayNameFormat="Full"/>
            
   </form>
        

</body>
</html>
<%@ Page Language="C#"%>

<!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 runat="server">
    <title> Calendar DayNameFormat Example </title>
</head>
<body>
   <form id="form1" runat="server">
  
     <h3> Calendar DayNameFormat Example </h3>

     <asp:Calendar id="Calendar1"
       daynameformat="Shortest"
       runat="server"/>
       
    </form>
  </body>
</html>
<%@ Page Language="VB"%>

<!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 runat="server">
    <title> Calendar DayNameFormat Example </title>
</head>
<body>
   <form id="form1" runat="server">
  
     <h3> Calendar DayNameFormat Example </h3>

     <asp:Calendar id="Calendar1"
       daynameformat="Shortest"
       runat="server"/>
       
    </form>
  </body>
</html>

설명

속성을 DayNameFormat 사용하여 요일의 이름 형식을 지정합니다. 이 속성 중 하나를 사용 하 여는 DayNameFormat 열거형 값입니다. 요일을 전체 이름, 짧은(약식) 이름, 일의 첫 글자 또는 처음 두 글자로 표시할지 여부를 지정할 수 있습니다.

이 속성은 속성이 ShowDayHeader .로 true설정된 경우에만 적용됩니다.

일 이름은 서버의 로컬 설정을 기반으로 합니다.

적용 대상

추가 정보