NextPrevFormat Sabit listesi

Tanım

içindeki Calendarönceki ve sonraki ay gezinti denetimlerinin görüntüleme biçimini temsil eder.

public enum class NextPrevFormat
public enum NextPrevFormat
type NextPrevFormat = 
Public Enum NextPrevFormat
Devralma
NextPrevFormat

Alanlar

CustomText 0

üzerindeki Calendaray gezinti denetimleri için özel metin biçimi.

FullMonth 2

üzerindeki Calendaray gezinti denetimleri için tam ay adı biçimi. Örneğin, "Ocak".

ShortMonth 1

üzerindeki Calendaray gezinti denetimleri için kısaltılmış ay adı biçimi. Örneğin, "Oca".

Örnekler

<%@ 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>

Açıklamalar

NextPrevFormat Sabit listesi, üzerindeki Calendarsonraki ve önceki ay düğmeleri için farklı stilleri temsil eder.

CustomText, programcının gezinti denetimleri için özel metin belirtmesine olanak tanır.

ShortMonth, ay için üç harfli bir kısaltma görüntüler.

FullMonth tüm ay adını görüntüler.

Şunlara uygulanır

Ayrıca bkz.