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

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

ConstructorNeedsTagAttribute.NeedsTag プロパティ

コントロールコンストラクタタグ名が必要かどうか示します。このプロパティ読み取り専用です。

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

Dim instance As ConstructorNeedsTagAttribute
Dim value As Boolean

value = instance.NeedsTag
public bool NeedsTag { get;
 }
public:
property bool NeedsTag {
    bool get ();
}
/** @property */
public boolean get_NeedsTag ()

プロパティ
コントロールコンストラクタタグ必要な場合true既定値false です。

使用例使用例
' Attach the ConstructorNeedsTagAttribute to the custom Simple
' class, which is derived from the WebControl class. This 
' instance of the ConstructorNeedsTagAttribute class sets the
' NeedsTag property to true.
<ConstructorNeedsTagAttribute(True)>  _
<AspNetHostingPermission(SecurityAction.Demand, _
  Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class
 Simple
  Inherits WebControl

  Private NameTag As String
 = ""
  
  
  Public Sub New(tag As
 String)
     Me.NameTag = tag
  End Sub 'New
  
  Private UserMessage As String
 = Nothing
  
  ' Create a property named ControlValue.   
  Public Property ControlValue() As
 [String]
     Get
        Return UserMessage
     End Get
     Set
        UserMessage = value
     End Set
  End Property
     
  Protected Overrides Sub
 Render(output As HtmlTextWriter)
     output.Write("Testing the ConstructorNeedsTagAttribute Class.")
  End Sub 'Render
End Class 'Simple
  // Attach the ConstructorNeedsTagAttribute to the custom Simple
  // class, which is derived from the WebControl class. This 
  // instance of the ConstructorNeedsTagAttribute class sets the
  // NeedsTag property to true.
  [ConstructorNeedsTagAttribute(true)]
  [AspNetHostingPermission(SecurityAction.Demand, 
     Level=AspNetHostingPermissionLevel.Minimal)]
  public sealed class Simple : WebControl 
  {
     private String NameTag = "";

     public Simple(String tag)
      {
            this.NameTag = tag;
      }         

      private String   UserMessage = null;

      // Create a property named ControlValue.
      public String ControlValue 
      {
         get 
         {
            return UserMessage;
         }
         set 
         {
            UserMessage = value;
         }
      }                



      protected override void Render(HtmlTextWriter
 output) 
      {
         output.Write("Testing the ConstructorNeedsTagAttribute Class.");
      }
}      
// Attach the ConstructorNeedsTagAttribute to the custom Simple
// class, which is derived from the WebControl class. This 
// instance of the ConstructorNeedsTagAttribute class sets the
// NeedsTag property to true.

/** @attribute ConstructorNeedsTagAttribute(true)
 */
public class Simple extends WebControl
{
    private String nameTag = "";

    public Simple(String tag)
    {
        this.nameTag = tag;
    } //Simple

    private String userMessage = null;
    // Create a property named ControlValue.
    /** @property 
     */
    public String get_ControlValue()
    {
        return userMessage;
    } //get_ControlValue
    /** @property 
     */
    public void set_ControlValue(String value)
    {
        userMessage = value;
    } //set_ControlValue

    protected void Render(HtmlTextWriter output)
    {
        output.Write("Testing the ConstructorNeedsTagAttribute Class.");
    } //Render
} //Simple
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConstructorNeedsTagAttribute クラス
ConstructorNeedsTagAttribute メンバ
System.Web.UI 名前空間


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS