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

속성 값

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 />합니다.

적용 대상

추가 정보