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

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

DayRenderEventArgs.SelectUrl プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

表示する日付ユーザーCalendar コントロール内で選択したときに、サーバーページポストバックするためのスクリプト取得します

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

解説解説
使用例使用例

今日の日付について表示する内容カスタマイズする方法次のコード例示しますユーザー今日の日付を選択するCalendar コントロールサーバーポストバックするように、SelectUrl プロパティの値が表示内容挿入されます。

<%@ Page Language="VB" %>

<script runat="server">

  Sub ScheduleCalendar_DayRender(ByVal sender
 As Object, ByVal e As
 DayRenderEventArgs) Handles ScheduleCalendar.DayRender
  
    ' Customize the caption for today's date.
    If e.Day.IsToday Then
    
      ' Create the content to render for today's date. Use the 
      ' SelectUrl property to retrieve the script used to post
      ' the page back to the server when the user selects the
      ' date.
      Dim dayContent As String
 = "<a href="""
 & e.SelectUrl & _
        """><img border=""0""
 alt=""Today"" src=""today.jpg""/></a>"
      
      ' Display the custom content in the date cell. 
      e.Cell.Text = dayContent
      
    End If
    
  End Sub
  
</script>

<html>
  <body>
    <form runat="server">
    
      <asp:calendar id="ScheduleCalendar"
        runat="server"/> 
    
    </form>
  </body>
</html>

<script runat="server">

  void ScheduleCalendar_DayRender(object sender, DayRenderEventArgs
 e)
  {
    // Customize the caption for today's date.
    if(e.Day.IsToday)
    {
      // Create the content to render for today's date. Use the 
      // SelectUrl property to retrieve the script used to post
      // the page back to the server when the user selects the
      // date.
      string dayContent = "<a href=\"" + e.SelectUrl
 +
        "\"><img border=\"0\" alt=\"Today\" src=\"today.jpg\"/></a>";
      
      // Display the custom content in the date cell. 
      e.Cell.Text = dayContent;
    }
    
  }
  
</script>

<html>
  <body>
    <form runat="server">
    
      <asp:calendar id="ScheduleCalendar"
        ondayrender="ScheduleCalendar_DayRender" 
        runat="server"/> 
    
    </form>
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DayRenderEventArgs クラス
DayRenderEventArgs メンバ
System.Web.UI.WebControls 名前空間
DayRenderEventArgs.Cell プロパティ
DayRenderEventArgs.Day プロパティ



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS