ConstructorNeedsTagAttribute.NeedsTag プロパティ
アセンブリ: System.Web (system.web.dll 内)

コントロールのコンストラクタにタグが必要な場合は 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

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からConstructorNeedsTagAttribute.NeedsTag プロパティを検索する場合は、下記のリンクをクリックしてください。

- ConstructorNeedsTagAttribute.NeedsTag プロパティのページへのリンク