Calendar.TodaysDate プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Calendar.TodaysDate プロパティの意味・解説 

Calendar.TodaysDate プロパティ

今日の日付の値を取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

TodaysDate プロパティ使用してCalendar コントロール今日の日付の値をプログラムによって設定する方法次のコード例示します

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

<html>
<head>

   <script language="VB" runat="server">

        Sub Selection_Change(sender As Object,
 e As EventArgs)
            Calendar1.TodaysDate = Calendar1.SelectedDate
            Label1.Text = "Today's Date is now " & Calendar1.TodaysDate.ToShortDateString()
        End Sub 'Selection_Change

   </script>

</head>     
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      Select a date on the
 Calendar control to use as today's
 date.<br><br>

      <asp:Calendar ID="Calendar1" runat="server"
  
           SelectionMode="Day" 
           ShowGridLines="True" 
           OnSelectionChanged="Selection_Change">

         <SelectedDayStyle BackColor="Yellow"
                           ForeColor="Red">
         </SelectedDayStyle>

      </asp:Calendar> 

      <hr><br>

      <asp:Label id="Label1" runat=server />

   </form>
</body>
</html>

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

<html>
<head>

   <script language="C#" runat="server">

      void Selection_Change(Object sender, EventArgs e) 
      {
         Calendar1.TodaysDate = Calendar1.SelectedDate;
         Label1.Text = "Today's Date is now " + Calendar1.TodaysDate.ToShortDateString();
      }

   </script>

</head>     
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      Select a date on the Calendar control to use as today's date.<br><br>

      <asp:Calendar ID="Calendar1" runat="server"  
           SelectionMode="Day" 
           ShowGridLines="True" 
           OnSelectionChanged="Selection_Change">

         <SelectedDayStyle BackColor="Yellow"
                           ForeColor="Red">
         </SelectedDayStyle>

      </asp:Calendar> 

      <hr><br>

      <asp:Label id="Label1" runat=server />

   </form>
</body>
</html>

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

<html>
<head>

   <script language="JScript" runat="server">

      function Selection_Change(sender : Object, e : EventArgs)
 
      {
         Calendar1.TodaysDate = Calendar1.SelectedDate;
         Label1.Text = "Today's Date is now " + Calendar1.TodaysDate.ToShortDateString();
      }

   </script>

</head>     
<body>

   <form runat="server">

      <h3>Calendar Example</h3>

      Select a date on the Calendar control to use as today's date.<br><br>

      <asp:Calendar ID="Calendar1" runat="server"  
           SelectionMode="Day" 
           ShowGridLines="True" 
           OnSelectionChanged="Selection_Change">

         <SelectedDayStyle BackColor="Yellow"
                           ForeColor="Red">
         </SelectedDayStyle>

      </asp:Calendar> 

      <hr><br>

      <asp:Label id="Label1" runat=server />

   </form>
</body>
</html>

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からCalendar.TodaysDate プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からCalendar.TodaysDate プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からCalendar.TodaysDate プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Calendar.TodaysDate プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Calendar.TodaysDate プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS