要求された ASP.NET ページに表示されるリテラル文字列を格納している LiteralControl クラスの新しいインスタンスを初期化します。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public Sub New
'使用
Dim instance As New LiteralControl
public LiteralControl ()
public:
LiteralControl ()
public LiteralControl ()
public function LiteralControl ()
適用できません。
使用例
LiteralControl クラスを拡張するための CustLiteralControlClass
を作成するコード例を次に示します。この例では、LiteralControl オブジェクトのテキストを指定しないコンストラクタを使用して、myLiteralControlClass1
という名前のクラスのインスタンスを作成しています。オブジェクトの作成後、Text プロパティを使用して格納されているテキストを設定します。
Dim myLiteralControlClass1 as CustomLiteralControlClass = _
new CustomLiteralControlClass()
myLiteralControlClass1.Text="This Control demonstrates the constructor1"
CustomLiteralControlClass myLiteralControlClass1=
new CustomLiteralControlClass();
myLiteralControlClass1.Text="This Control demonstrates the constructor1";
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0