Calendar.CreateControlCollection メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Calendar.CreateControlCollection メソッドの意味・解説 

Calendar.CreateControlCollection メソッド

コントロール格納するコレクション作成します

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

Protected Overrides Function
 CreateControlCollection As ControlCollection
Dim returnValue As ControlCollection

returnValue = Me.CreateControlCollection
protected override ControlCollection CreateControlCollection ()
protected:
virtual ControlCollection^ CreateControlCollection () override
protected ControlCollection CreateControlCollection ()
protected override function CreateControlCollection
 () : ControlCollection

戻り値
常に InternalControlCollection を返します

解説解説
使用例使用例

カスタム サーバー コントロールCreateControlCollection メソッドオーバーライドし、Calendar コントロールの EmptyControlCollection クラス新しインスタンスが常に返されるようにする方法次のコード例示します

<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.VB.Controls"
 Assembly="Samples.AspNet.VB"
 %>
<%@ Page language="VB" %>
<HTML>
  <HEAD>
    <title>Custom Calendar - CreateControlCollection - VB.NET Example</title>
  </HEAD>
  <body>
    <form id="Form1" method="post"
 runat="server">
      <h3>Custom Calendar - CreateControlCollection - VB.NET Example</h3>
      <aspSample:CustomCalendarCreateControlCollection id="Calendar1"
 runat="server" />
    </form>
  </body>
</HTML>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.CS.Controls"
 Assembly="Samples.AspNet.CS" %>
<%@ Page language="c#" %>
<HTML>
  <HEAD>
    <title>Custom Calendar - CreateControlCollection - C# Example</title>
  </HEAD>
  <body>
    <form id="Form1" method="post" runat="server">
      <h3>Custom Calendar - CreateControlCollection - C# Example</h3>

      <aspSample:CustomCalendarCreateControlCollection
        id="Calendar1"
        runat="server" />

    </form>
  </body>
</HTML>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.JSL.Controls"
 Assembly="Samples.AspNet.JSL" %>
<%@ Page language="VJ#" %>
<HTML>
  <HEAD>
    <title>Custom Calendar - CreateControlCollection - VJ# Example</title>
  </HEAD>
  <body>
    <form id="Form1" method="post" runat="server">
      <h3>Custom Calendar - CreateControlCollection - VJ# Example</h3>

      <aspSample:CustomCalendarCreateControlCollection
        id="Calendar1"
        runat="server" />

    </form>
  </body>
</HTML>
Imports System.Web
Imports System.Security.Permissions

Namespace Samples.AspNet.VB.Controls
    <AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)>
 _
    Public NotInheritable Class
 CustomCalendarCreateControlCollection
        Inherits System.Web.UI.WebControls.Calendar

        Protected Overrides Function
 CreateControlCollection() As System.Web.UI.ControlCollection
            ' Return a new EmptyControlCollection
            Return New System.Web.UI.EmptyControlCollection(Me)
        End Function
    End Class
End Namespace
using System.Web;
using System.Security.Permissions;

namespace Samples.AspNet.CS.Controls
{
    [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
    public sealed class CustomCalendarCreateControlCollection
 : System.Web.UI.WebControls.Calendar
    {
    protected override System.Web.UI.ControlCollection CreateControlCollection()
    {
      // Return a new EmptyControlCollection
      return new System.Web.UI.EmptyControlCollection(this);
    }
  }
}
package Samples.AspNet.JSL.Controls;

public class CustomCalendarCreateControlCollection
    extends System.Web.UI.WebControls.Calendar
{
    protected System.Web.UI.ControlCollection CreateControlCollection()
    {
        // Return a new EmptyControlCollection
        return new System.Web.UI.EmptyControlCollection(this);
    } //CreateControlCollection
} //CustomCalendarCreateControlCollection
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

Calendar.CreateControlCollection メソッドのお隣キーワード
検索ランキング

   

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



Calendar.CreateControlCollection メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS