ConnectionsZone.InstructionTitle 속성

정의

기존 연결을 관리하기 위한 연결 UI(사용자 인터페이스) 내에서 소비자 또는 공급자 컨트롤에 대해 수행할 수 있는 작업에 대한 일반적인 설명으로 사용되는 텍스트를 가져오거나 설정합니다.

public:
 virtual property System::String ^ InstructionTitle { System::String ^ get(); void set(System::String ^ value); };
public virtual string InstructionTitle { get; set; }
member this.InstructionTitle : string with get, set
Public Overridable Property InstructionTitle As String

속성 값

String

연결 UI의 지침 제목이 들어 있는 문자열입니다. 기본 텍스트는 .NET Framework에서 제공하는 culture별 문자열입니다.

예제

다음 코드 예제에서는 컨트롤을 사용 하 InstructionTitle 여 속성을 사용 하는 방법을 보여 줍니다 ConnectionsZone . 이 예제에는 속성의 사용을 보여 주는 웹 페이지의 코드만 포함됩니다. 예제를 실행하는 데 필요한 다른 두 코드 파일은 클래스 개요의 예제 섹션을 ConnectionsZone 참조하세요. 코드 예제에는 다음 네 부분이 있습니다.

  • 웹 페이지에서 표시 모드를 전환할 수 있는 사용자 컨트롤입니다. 클래스 개요에서 ConnectionsZone 이 코드를 가져옵니다.

  • 우편 번호 인터페이스에 대한 코드와 연결의 공급자 및 소비자 역할을 하는 두 개의 WebPart 컨트롤이 포함된 소스 파일입니다. 클래스 개요에서 ConnectionsZone 이 코드를 가져옵니다.

  • 모든 컨트롤을 호스트하고, 요소를 선언 <asp:connectionszone> 하고, 속성을 프로그래밍 방식으로 사용하는 방법을 보여 주는 웹 페이지입니다.

  • 예제가 브라우저에서 작동하는 방식에 대한 설명입니다.

웹 페이지에서 요소를 선언 <asp:connectionszone> 하고 메서드에서 Page_PreRender 코드는 속성에 값을 InstructionTitle 할당합니다.

<%@ Page Language="C#" %>
<%@ register tagprefix="uc1" 
    tagname="DisplayModeMenuCS"
    src="~/displaymodemenucs.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.CS.Controls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  protected void Page_PreRender(object sender, EventArgs e)
  {
     // Set properties on verbs.
     connectionsZone1.CancelVerb.Description = 
       "Terminates the connection process";
     connectionsZone1.CloseVerb.Description = 
       "Closes the connections UI";
     connectionsZone1.ConfigureVerb.Description =
       "Configure the transformer for the connection";
     connectionsZone1.ConnectVerb.Description =
       "Connect two WebPart controls";
     connectionsZone1.DisconnectVerb.Description =
       "End the connection between two controls";
    
     // Set properties for UI text strings.
     connectionsZone1.ConfigureConnectionTitle = 
       "Configure";
     connectionsZone1.ConnectToConsumerInstructionText = 
       "Choose a consumer connection point";
     connectionsZone1.ConnectToConsumerText = 
       "Select a consumer for the provider to connect with";
     connectionsZone1.ConnectToConsumerTitle = 
       "Send data to this consumer";
     connectionsZone1.ConnectToProviderInstructionText =
       "Choose a provider connection point";
     connectionsZone1.ConnectToProviderText =
       "Select a provider for the consumer to connect with";
     connectionsZone1.ConnectToProviderTitle =
       "Get data from this provider";
     connectionsZone1.ConsumersInstructionText = 
       "WebPart controls that receive data from providers";
     connectionsZone1.ConsumersTitle = "Consumer Controls";
     connectionsZone1.GetFromText = "Receive from";
     connectionsZone1.GetText = "Retrieve";
     connectionsZone1.HeaderText = 
      "Create and Manage Connections";
     connectionsZone1.InstructionText = 
      "Manage connections for the selected WebPart control";
     connectionsZone1.InstructionTitle = 
       "Manage connections for consumers or providers";
     connectionsZone1.NoExistingConnectionInstructionText = 
       "No connections exist. Click the above link to create "
       + "a connection.";
     connectionsZone1.NoExistingConnectionTitle = 
       "No current connections";
     connectionsZone1.ProvidersInstructionText =
       "WebPart controls that send data to consumers";
     connectionsZone1.ProvidersTitle = "Provider controls";
     
  }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Connection Zone Sample</title>
</head>
<body>
  <form id="form1" runat="server">
  <asp:webpartmanager runat="server" id="mgr">
    <staticconnections>
      <asp:webpartconnection id="connection1" 
        consumerconnectionpointid="ZipCodeConsumer"
        consumerid="zipConsumer"
        providerconnectionpointid="ZipCodeProvider" 
        providerid="zipProvider" />
    </staticconnections>
  </asp:webpartmanager>
  <uc1:displaymodemenucs id="menu1" runat="server" />
  <div>
  <asp:webpartzone id="WebPartZone1" runat="server">
    <zonetemplate>
      <aspsample:zipcodewebpart id="zipProvider" runat="server" 
        Title="Zip Code Provider"  />
      <aspsample:weatherwebpart id="zipConsumer" runat="server" 
        Title="Zip Code Consumer" />
    </zonetemplate>
  </asp:webpartzone>
  <asp:connectionszone id="connectionsZone1" runat="server" >
    <cancelverb text="Terminate" />
    <closeverb text="Close Zone" />
    <configureverb text="Configure" />
    <connectverb text="Connect Controls" />
    <disconnectverb text="End Connection" />
  </asp:connectionszone>
  </div>
  </form>
</body>
</html>
<%@ Page Language="VB" %>
<%@ register tagprefix="uc1" 
    tagname="DisplayModeMenuVB"
    src="~/displaymodemenuvb.ascx" %>
<%@ Register TagPrefix="aspSample" 
    Namespace="Samples.AspNet.VB.Controls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  Protected Sub Page_PreRender(ByVal sender As Object, _
    ByVal e As System.EventArgs)
    
    ' Set properties for verbs.
    connectionsZone1.CancelVerb.Description = _
      "Terminates the connection process"
    connectionsZone1.CloseVerb.Description = _
      "Closes the connections UI"
    connectionsZone1.ConfigureVerb.Description = _
      "Configure the transformer for the connection"
    connectionsZone1.ConnectVerb.Description = _
      "Connect two WebPart controls"
    connectionsZone1.DisconnectVerb.Description = _
      "End the connection between two controls"
    
    ' Set properties for UI text strings.
    connectionsZone1.ConfigureConnectionTitle = _
      "Configure a new connection"
    connectionsZone1.ConnectToConsumerInstructionText = _
      "Choose a consumer connection point"
    connectionsZone1.ConnectToConsumerText = _
      "Select a consumer for the provider to connect with"
    connectionsZone1.ConnectToConsumerTitle = _
      "Send data to this consumer"
    connectionsZone1.ConnectToProviderInstructionText = _
      "Choose a provider connection point"
    connectionsZone1.ConnectToProviderText = _
      "Select a provider for the consumer to connect with"
    connectionsZone1.ConnectToProviderTitle = _
      "Get data from this provider"
    connectionsZone1.ConsumersInstructionText = _
      "WebPart controls that receive data from providers"
    connectionsZone1.ConsumersTitle = "Consumer Controls"
    connectionsZone1.GetFromText = "Receive from"
    connectionsZone1.GetText = "Retrieve"
    connectionsZone1.HeaderText = _
      "Create and Manage Connections"
    connectionsZone1.InstructionText = _
      "Manage connections for the selected WebPart control"
    connectionsZone1.InstructionTitle = _
      "Manage connections for consumers or providers"
    connectionsZone1.NoExistingConnectionInstructionText = _
      "No connections exist. Click the above link to create " _
      & "a connection."
    connectionsZone1.NoExistingConnectionTitle = _
      "No current connections"
    connectionsZone1.ProvidersInstructionText = _
      "WebPart controls that send data to consumers"
    connectionsZone1.ProvidersTitle = "Provider controls"

  End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Connection Zone Sample</title>
</head>
<body>
  <form id="form1" runat="server">
  <asp:webpartmanager runat="server" id="mgr">
    <staticconnections>
      <asp:webpartconnection id="connection1" 
        consumerconnectionpointid="ZipCodeConsumer"
        consumerid="zipConsumer"
        providerconnectionpointid="ZipCodeProvider" 
        providerid="zipProvider" />
    </staticconnections>
  </asp:webpartmanager>
  <uc1:displaymodemenuvb id="menu1" runat="server" />
  <div>
  <asp:webpartzone id="WebPartZone1" runat="server">
    <zonetemplate>
      <aspsample:zipcodewebpart id="zipProvider" runat="server" 
        Title="Zip Code Provider" />
      <aspsample:weatherwebpart id="zipConsumer" runat="server" 
        Title="Zip Code Consumer" />
    </zonetemplate>
  </asp:webpartzone>
  <asp:connectionszone id="connectionsZone1" runat="server" >
    <cancelverb text="Terminate" />
    <closeverb text="Close Zone" />
    <configureverb text="Configure" />
    <connectverb text="Connect Controls" />
    <disconnectverb text="End Connection" />
  </asp:connectionszone>
  </div>
  </form>
</body>
</html>

브라우저에서 페이지를 로드 합니다. 디스플레이 모드 컨트롤을 사용하여 연결 모드로 전환합니다. 우편 번호 소비자 컨트롤에서 동사 메뉴 화살표를 클릭하고 연결 동사를 클릭합니다. 기존 연결에 대해 열리는 보기에서 연결 영역 맨 위에 있는 헤더 텍스트 바로 아래에 있는 명령 제목은 코드 예제의 속성에 할당된 InstructionTitle 값입니다.

설명

속성에 InstructionTitle 포함된 텍스트는 연결 UI가 표시되고 연결이 이미 있을 때마다 표시됩니다. 명령 제목 텍스트는 연결 UI의 맨 위에 있는 헤더 텍스트(속성에 포함됨 HeaderText ) 바로 아래에 있습니다. 명령 제목은 기존 연결에 참여하는 소비자 또는 공급자 WebPart 컨트롤에서 수행할 수 있는 작업 유형을 사용자에게 알리는 일반적인 설명입니다. 기본적으로 명령 제목은 연결 관리 로 시작하고 동사 메뉴에서 연결 동사를 클릭하여 사용자가 선택한 소비자 또는 공급자 컨트롤의 이름으로 끝납니다.

참고

이 속성에 사용자 지정 값을 할당할 때 사용자가 연결을 관리할 공급자 또는 소비자 컨트롤을 선택할지 여부를 디자인 타임에 알 수 없으므로 사용자 지정 명령 제목은 소비자 또는 공급자 컨트롤을 참조할 만큼 일반적이어야 합니다. 반면, 속성의 기본값은 사용자가 선택하는 소비자 또는 공급자 컨트롤의 이름을 동적으로 추가하도록 렌더링됩니다. 이 동작을 모방하는 속성에 대한 사용자 지정 값을 제공하려면 클래스에서 ConnectionsZone 상속하고 이 속성 또는 메서드를 재정의 RenderBody 해야 합니다.

명명 InstructionTitle 된 특성을 추가하고 값을 할당하여 요소의 여는 태그 내에서 선언적으로 이 속성의 <asp:connectionszone> 값을 설정할 수 있습니다. 프로그래밍 방식으로 속성 값을 설정할 수도 있습니다.

적용 대상

추가 정보