TitleFormat 列挙体
アセンブリ: System.Web (system.web.dll 内)

Public Enumeration TitleFormat



予定表のタイトルを既定の書式 (MonthYear) から Month 書式に変更する方法を次のコード例に示します。この例を実行するには、WebForm1 という名前の Web フォーム ページを作成し、Page_load メソッドをこのプログラム例に置き換えます。
Private Sub Page_Load(sender As Object, e As System.EventArgs) ' Change the title format of Calendar1. Calendar1.TitleFormat = TitleFormat.Month End Sub 'Page_Load
private void Page_Load(object sender, System.EventArgs e) { // Change the title format of Calendar1. Calendar1.TitleFormat = TitleFormat.Month; }
private void Page_Load(Object sender, System.EventArgs e) { // Change the title format of Calendar1. calendar1.set_TitleFormat(TitleFormat.Month); } //Page_Load
<%@ Page Language="VB" AutoEventWireup="True" %> <html> <script runat="server" > Sub Selection_Change(sender As Object, e As EventArgs) ' Set the title format. Calendar1.TitleFormat = CType(ModeList.SelectedIndex, TitleFormat) End Sub </script> <body> <form runat="server"> <h3> Calendar TitleFormat Example </h3> Choose the title format. <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="ModeList" AutoPostBack="True" OnSelectedIndexChanged="Selection_Change" runat="server"> <asp:ListItem> Month </asp:ListItem> <asp:ListItem Selected="True"> MonthYear </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 title format. Calendar1.TitleFormat = (TitleFormat)ModeList.SelectedIndex; } </script> <body> <form runat="server"> <h3> Calendar TitleFormat Example </h3> Choose the title format. <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="ModeList" AutoPostBack="True" OnSelectedIndexChanged="Selection_Change" runat="server"> <asp:ListItem> Month </asp:ListItem> <asp:ListItem Selected="True"> MonthYear </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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- TitleFormat 列挙体のページへのリンク