ConnectionsZone.ConsumersTitle 속성

정의

연결이 이미 설정된 경우 연결 UI(사용자 인터페이스)의 소비자 구역 위에 표시되는 지침 텍스트를 가져오거나 설정합니다.

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

속성 값

String

연결에 참여하는 소비자에 대한 제목 텍스트로 사용되는 문자열입니다. 기본 제목은 .NET Framework에서 제공하는 culture별 문자열입니다.

예제

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

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

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

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

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

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

<%@ 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>

브라우저에서 페이지를 로드 합니다. 디스플레이 모드 컨트롤을 사용하여 연결 모드로 전환합니다. 우편 번호 공급자 컨트롤에서 동사 메뉴 화살표를 클릭하고 연결 동사를 클릭합니다. 기존 연결에 대해 열리는 보기에서 속성에 할당된 사용자 지정 텍스트에 대한 소비자 섹션을 ConsumersTitle 찾습니다.

설명

이 속성은 ConsumersTitle 특정 연결 시나리오에서 적용됩니다. 사용자가 공급자 컨트롤에서 연결 동사를 클릭하고 연결이 이미 있는 경우 컨트롤에 ConnectionsZone 사용자가 연결 연결을 끊을 수 있는 보기가 표시됩니다. 보기에는 연결에 참여하는 모든 소비자도 표시됩니다. 소비자 목록 바로 위에는 소비자 명령 텍스트가 있으며, 그 위에는 속성이 텍스트를 제공하는 소비자 섹션 ConsumersTitle 의 제목이 있습니다.

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

적용 대상

추가 정보