LiteralControl コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LiteralControl コンストラクタの意味・解説 

LiteralControl コンストラクタ


LiteralControl コンストラクタ (String)

テキスト指定して、LiteralControl クラス新しインスタンス初期化します。

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

使用例使用例

LiteralControl コンストラクタ使用してLiteralControl クラス2 つインスタンス作成するコード例次に示します2 つインスタンスは、H3 HTML 要素開始タグ終了タグレンダリングし、H3 タグ内に表示されるテキスト挿入します

' Add two LiteralControls that render HTML H3 elements and text.
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand,
 Name:="FullTrust")> _
Protected Overrides Sub
 CreateChildControls()

    Me.Controls.Add(New LiteralControl("<h3>Value:
 "))

    Dim Box As New TextBox
    Box.Text = "0"
    Me.Controls.Add(box)

    Me.Controls.Add(New LiteralControl("</h3>"))
End Sub
// Add two LiteralControls that render HTML H3 elements and text.
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand,
 Name="FullTrust")] 
protected override void CreateChildControls()
 {

    this.Controls.Add(new LiteralControl("<h3>Value:
 "));

    TextBox box = new TextBox();
    box.Text = "0";
    this.Controls.Add(box);

    this.Controls.Add(new LiteralControl("</h3>"));
}
// Add two LiteralControls that render HTML H3 elements and text.
protected void CreateChildControls()
{
    this.get_Controls().Add(new LiteralControl("<h3>Value:
 "));

    TextBox box = new TextBox();
    box.set_Text("0");
    this.get_Controls().Add(box);

    this.get_Controls().Add(new LiteralControl("</h3>"));
} //CreateChildControls
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LiteralControl クラス
LiteralControl メンバ
System.Web.UI 名前空間
LiteralControl.Text

LiteralControl コンストラクタ ()

要求されASP.NET ページ表示されるリテラル文字列格納している LiteralControl クラス新しインスタンス初期化します。

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

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";
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LiteralControl クラス
LiteralControl メンバ
System.Web.UI 名前空間



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

辞書ショートカット

すべての辞書の索引

「LiteralControl コンストラクタ」の関連用語

LiteralControl コンストラクタのお隣キーワード
検索ランキング

   

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



LiteralControl コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS