ControlPersister.PersistControl メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したコントロールの永続化された形式を表すデータの文字列を取得します。
オーバーロード
| 名前 | 説明 |
|---|---|
| PersistControl(Control) |
指定したコントロールの永続化された形式を表すデータの文字列を取得します。 |
| PersistControl(TextWriter, Control) |
指定したコントロールの永続化された形式を表すデータの文字列を、指定した TextWriterに出力します。 |
| PersistControl(Control, IDesignerHost) |
指定したデザイナー ホストを使用して、指定したコントロールの永続化された形式を表すデータの文字列を取得します。 |
| PersistControl(TextWriter, Control, IDesignerHost) |
指定したデザイナー ホストを使用して、指定したコントロールの永続化された形式を表すデータの文字列を、指定した TextWriterに出力します。 |
PersistControl(Control)
指定したコントロールの永続化された形式を表すデータの文字列を取得します。
public:
static System::String ^ PersistControl(System::Web::UI::Control ^ control);
public static string PersistControl(System.Web.UI.Control control);
static member PersistControl : System.Web.UI.Control -> string
Public Shared Function PersistControl (control As Control) As String
パラメーター
返品
コントロールの永続化された形式を表す文字列。
例
// Parse the selected control.
String^ persistedData = ControlPersister::PersistControl( controlArray[ selectionForm->controlList->SelectedIndex ] );
// Parse the selected control into a persistence string.
string persistedData = ControlPersister.PersistControl(
controlArray[selectionForm.controlList.SelectedIndex]);
' Parse the selected control.
Dim persistedData As String = ControlPersister.PersistControl( _
controlArray(selectionForm.controlList.SelectedIndex))
注釈
このメソッドを正しく動作させるには、 IDesignerHost 実装が必要です。 このメソッドは、指定したコントロールの Site を使用してデザイナー ホストを取得します。
適用対象
PersistControl(TextWriter, Control)
指定したコントロールの永続化された形式を表すデータの文字列を、指定した TextWriterに出力します。
public:
static void PersistControl(System::IO::TextWriter ^ sw, System::Web::UI::Control ^ control);
public static void PersistControl(System.IO.TextWriter sw, System.Web.UI.Control control);
static member PersistControl : System.IO.TextWriter * System.Web.UI.Control -> unit
Public Shared Sub PersistControl (sw As TextWriter, control As Control)
パラメーター
- sw
- TextWriter
永続化されたコントロール データを出力する TextWriter 。
注釈
このメソッドを正しく動作させるには、 IDesignerHost 実装が必要です。 このメソッドは、指定したコントロールの Site を使用してデザイナー ホストを取得します。
適用対象
PersistControl(Control, IDesignerHost)
指定したデザイナー ホストを使用して、指定したコントロールの永続化された形式を表すデータの文字列を取得します。
public:
static System::String ^ PersistControl(System::Web::UI::Control ^ control, System::ComponentModel::Design::IDesignerHost ^ host);
public static string PersistControl(System.Web.UI.Control control, System.ComponentModel.Design.IDesignerHost host);
static member PersistControl : System.Web.UI.Control * System.ComponentModel.Design.IDesignerHost -> string
Public Shared Function PersistControl (control As Control, host As IDesignerHost) As String
パラメーター
- host
- IDesignerHost
コントロールのデザイナー ホストである IDesignerHost 。
返品
コントロールの永続化された形式を表す文字列。
例
// Parse the selected control.
String^ persistedData = ControlPersister::PersistControl( controlArray[ selectionForm->controlList->SelectedIndex ] );
// Parse the selected control into a persistence string.
string persistedData = ControlPersister.PersistControl(
controlArray[selectionForm.controlList.SelectedIndex]);
' Parse the selected control.
Dim persistedData As String = ControlPersister.PersistControl( _
controlArray(selectionForm.controlList.SelectedIndex))
注釈
このメソッドを正しく動作させるには、 IDesignerHost 実装が必要です。
適用対象
PersistControl(TextWriter, Control, IDesignerHost)
指定したデザイナー ホストを使用して、指定したコントロールの永続化された形式を表すデータの文字列を、指定した TextWriterに出力します。
public:
static void PersistControl(System::IO::TextWriter ^ sw, System::Web::UI::Control ^ control, System::ComponentModel::Design::IDesignerHost ^ host);
public static void PersistControl(System.IO.TextWriter sw, System.Web.UI.Control control, System.ComponentModel.Design.IDesignerHost host);
static member PersistControl : System.IO.TextWriter * System.Web.UI.Control * System.ComponentModel.Design.IDesignerHost -> unit
Public Shared Sub PersistControl (sw As TextWriter, control As Control, host As IDesignerHost)
パラメーター
- sw
- TextWriter
永続化されたコントロール データを出力する TextWriter 。
- host
- IDesignerHost
コントロールのデザイナー ホストである IDesignerHost 。
注釈
このメソッドを正しく動作させるには、 IDesignerHost 実装が必要です。