Export (0) Print
Expand All
Expand Minimize

NextPrevFormat Enumeration

Represents the display format for the previous and next month navigation controls within the Calendar.

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

public enum NextPrevFormat
public enum NextPrevFormat
public enum NextPrevFormat

 Member nameDescription
CustomTextCustom text format for the month navigation controls on the Calendar
FullMonthFull month name format for the month navigation controls on the Calendar. For example, "January". 
ShortMonthAbbreviated month name format for the month navigation controls on the Calendar. For example, "Jan". 

The NextPrevFormat enumeration represents the different styles for the next and previous month buttons on the Calendar.

CustomText allows the programmer to specify custom text for the navigation controls.

ShortMonth displays a three-letter abbreviation for the month.

FullMonth displays the entire month name.

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

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft