Freigeben über


NextPrevFormat-Enumeration

Stellt das Anzeigeformat der Navigationssteuerelemente für den vorherigen und den nächsten Monat im Calendar dar.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public Enumeration NextPrevFormat
'Usage
Dim instance As NextPrevFormat
public enum NextPrevFormat
public enum class NextPrevFormat
public enum NextPrevFormat
public enum NextPrevFormat

Member

  Membername Beschreibung
CustomText Ein benutzerdefiniertes Textformat für die Steuerelemente zum Navigieren zwischen den Monaten im Calendar
FullMonth Ein Format mit vollständigen Monatsnamen für die Steuerelemente zum Navigieren zwischen den Monaten im Calendar. Beispiel: "Januar". 
ShortMonth Ein Format mit abgekürzten Monatsnamen für die Steuerelemente zum Navigieren zwischen den Monaten im Calendar. Beispiel: "Jan". 

Hinweise

Die NextPrevFormat-Enumeration enthält die unterschiedlichen Formate der Schaltflächen für den nächsten und den vorherigen Monat im Calendar.

Mit CustomText kann der Programmierer eigenen Text für die Navigationssteuerelemente angeben.

ShortMonth zeigt eine aus drei Buchstaben bestehende Abkürzung für den Monat an.

FullMonth zeigt den ausgeschriebenen Monatsnamen an.

Beispiel

<%@ Page Language="VB" AutoEventWireup="True" %>

<html>
   <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>
  
<body>

   <form 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>
  
   </form>

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

<html>
   <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>
  
<body>

   <form 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>
  
   </form>

</body>
</html>
 

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

System.Web.UI.WebControls-Namespace
Calendar.NextPrevFormat-Eigenschaft
Calendar-Klasse