TagPrefixInfo.TagPrefix プロパティ

定義

ソース ファイルまたは名前空間とアセンブリに関連付けられるタグ プリフィックスを取得または設定します。

public:
 property System::String ^ TagPrefix { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("tagPrefix", DefaultValue="/", IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string TagPrefix { get; set; }
[<System.Configuration.ConfigurationProperty("tagPrefix", DefaultValue="/", IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.TagPrefix : string with get, set
Public Property TagPrefix As String

プロパティ値

タグ プリフィックス。

属性

次のコード例は、TagPrefix プロパティの使用方法を示しています。 このコード例は、PagesSection クラスのために提供されている大規模な例の一部です。

// Get all current Controls in the collection.
for (int i = 0; i < pagesSection.Controls.Count; i++)
{
  Console.WriteLine("Control {0}:", i);
  Console.WriteLine("  TagPrefix = '{0}' ",
      pagesSection.Controls[i].TagPrefix);
  Console.WriteLine("  TagName = '{0}' ",
      pagesSection.Controls[i].TagName);
  Console.WriteLine("  Source = '{0}' ",
      pagesSection.Controls[i].Source);
  Console.WriteLine("  Namespace = '{0}' ",
      pagesSection.Controls[i].Namespace);
  Console.WriteLine("  Assembly = '{0}' ",
      pagesSection.Controls[i].Assembly);
}
' Get all current Controls in the collection.
Dim j As Int32
For j = 0 To pagesSection.Controls.Count - 1
  Console.WriteLine("Control {0}:", j)
  Console.WriteLine("  TagPrefix = '{0}' ", _
   pagesSection.Controls(j).TagPrefix)
  Console.WriteLine("  TagName = '{0}' ", _
   pagesSection.Controls(j).TagName)
  Console.WriteLine("  Source = '{0}' ", _
   pagesSection.Controls(j).Source)
  Console.WriteLine("  Namespace = '{0}' ", _
   pagesSection.Controls(j).Namespace)
  Console.WriteLine("  Assembly = '{0}' ", _
   pagesSection.Controls(j).Assembly)
Next

注釈

プロパティは TagPrefix 、コントロールが存在する名前空間に使用されるエイリアスを定義します。 これは、ユーザー コントロールとカスタム コントロールに適用されます。 これは、ASP.NET コードのタグ名の前にある値です。 たとえば、 の "myTag" です <myTag: myControl />

適用対象

こちらもご覧ください