ConnectionsZone.ConnectToProviderInstructionText 속성

정의

연결 UI(사용자 인터페이스)에서 사용자가 소비자와 연결할 공급자 연결 지점을 선택할 수 있는 구역에 표시되는 지침 텍스트를 가져오거나 설정합니다.

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

속성 값

String

소비자에 대한 공급자 연결을 만들기 위한 지침이 들어 있는 문자열입니다. 기본 텍스트는 .NET Framework에서 제공하는 culture별 문자열입니다.

예제

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

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

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

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

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

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

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

브라우저에서 페이지를 로드 합니다. 디스플레이 모드 컨트롤을 사용하여 연결 모드로 전환합니다. 우편 번호 소비자 컨트롤에서 동사 메뉴 화살표를 클릭하고 동사 연결을 클릭합니다. 연결 종료 단추를 클릭하여 연결을 종료한 다음 하이퍼링크를 사용하여 연결할 소비자에 대한 공급자 선택을 클릭합니다. 공급자 연결 UI가 나타나고 속성에 할당된 사용자 지정 텍스트가 소비자와 연결하기 ConnectToProviderInstructionText 위해 공급자의 연결점을 선택할 수 있는 컨트롤이 있는 영역 바로 위에 나타납니다.

설명

속성은 ConnectToProviderInstructionText 특정 연결 시나리오에서 적용됩니다. 사용자가 소비자 컨트롤 ConnectionsZone 에서 연결 동사를 클릭하면 사용자가 공급자를 선택할 수 있도록 하는 연결 UI의 일부가 컨트롤에 표시됩니다. 사용자가 공급자에서 연결 동사를 클릭하면 연결 UI가 역방향을 수행하고 소비자에 연결하는 방법에 대한 정보를 표시합니다.

속성의 ConnectToProviderInstructionText 텍스트는 소비자가 연결할 수 있는 사용 가능한 공급자 연결 지점을 포함하는 드롭다운 목록 컨트롤 바로 위에 표시됩니다.

페이지에서 요소의 <asp:connectionszone> 여는 태그에 있는 특성을 사용하여 ConnectToProviderInstructionText 선언적으로 이 속성을 설정하거나 프로그래밍 방식으로 속성을 설정할 수 있습니다.

적용 대상

추가 정보