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

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

ControlDesigner.GetEmptyDesignTimeHtml メソッド

実行時ビジュアルな表示存在しない Web サーバー コントロールデザイン時に表すための HTML マークアップ取得します

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

Protected Overridable Function
 GetEmptyDesignTimeHtml As String
Dim returnValue As String

returnValue = Me.GetEmptyDesignTimeHtml
protected virtual string GetEmptyDesignTimeHtml
 ()
protected:
virtual String^ GetEmptyDesignTimeHtml ()
protected String GetEmptyDesignTimeHtml ()
protected function GetEmptyDesignTimeHtml ()
 : String

戻り値
他にビジュアルな表示存在しないコントロールデザイン時に表すために使用する HTML マークアップ既定値は、コンポーネント種類ID含んでいる四角形です。

解説解説

GetEmptyDesignTimeHtml メソッド既定動作では、コンポーネント名を含んでいる文字列返しますデザインHTML マークアップ存在しない場合は、GetDesignTimeHtml メソッド実装GetEmptyDesignTimeHtml メソッド呼び出す必要があります

使用例使用例

カスタム コントロール デザイナGetDesignTimeHtml メソッドオーバーライドする方法次のコード例示します関連付けられているコントロールText プロパティが空の場合GetDesignTimeHtml メソッドGetEmptyDesignTimeHtml メソッド呼び出します。それ以外場合GetDesignTimeHtml メソッドHyperlink コントロール作成および表示します

Public Overrides Function
 GetDesignTimeHtml() As String
   ' Component is the instance of the component or control that
   ' this designer object is associated with. This property is 
   ' inherited from System.ComponentModel.ComponentDesigner.
   simpleControl = CType(Component, Simple)
   
   If simpleControl.Text.Length > 0 Then
      Dim sw As New StringWriter()
      Dim tw As New HtmlTextWriter(sw)
      
      Dim placeholderLink As New
 HyperLink()
      
      ' Put simpleControl.Text into the link's Text.
      placeholderLink.Text = simpleControl.Text
      placeholderLink.NavigateUrl = simpleControl.Text
      placeholderLink.RenderControl(tw)
      
      Return sw.ToString()
   Else
      Return GetEmptyDesignTimeHtml()
   End If
End Function
public override string GetDesignTimeHtml()
{
    if (simpleControl.Text.Length > 0)
    {
        string spec = "<a href='{0}.aspx'>{0}</a>";
        return String.Format(spec, simpleControl.Text);
    }
    else
        return GetEmptyDesignTimeHtml();
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlDesigner クラス
ControlDesigner メンバ
System.Web.UI.Design 名前空間
GetErrorDesignTimeHtml
GetDesignTimeHtml
その他の技術情報
Web フォームデザインサポート


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS