다음을 통해 공유


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 />.

적용 대상

추가 정보