ConnectionsZone.CancelVerb 속성

정의

최종 사용자가 연결 설정 프로세스를 취소할 수 있도록 하는 WebPartVerb 개체에 대한 참조를 가져옵니다.

public:
 virtual property System::Web::UI::WebControls::WebParts::WebPartVerb ^ CancelVerb { System::Web::UI::WebControls::WebParts::WebPartVerb ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public virtual System.Web.UI.WebControls.WebParts.WebPartVerb CancelVerb { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.CancelVerb : System.Web.UI.WebControls.WebParts.WebPartVerb
Public Overridable ReadOnly Property CancelVerb As WebPartVerb

속성 값

WebPartVerb

최종 사용자가 두 컨트롤을 연결하는 프로세스를 취소할 수 있도록 하는 WebPartVerb입니다.

특성

예제

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

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

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

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

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

웹 페이지는 요소를 선언 <asp:connectionszone> 하고 요소 내에서 요소를 선언 <cancelverb> 하고 특성을 사용하여 일부 속성을 설정합니다. 또한 메서드에서 Page_PreRender 코드는 컨트롤의 취소 동사에 일부 ConnectionsZone 속성을 설정합니다.

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

브라우저에서 페이지를 로드 합니다. 디스플레이 모드 컨트롤을 사용하여 연결 모드로 전환합니다. 우편 번호 공급자 컨트롤에서 동사 메뉴 화살표를 클릭하고 연결 동사를 클릭합니다. 연결 종료 단추를 클릭하여 페이지의 선언적 연결로 인해 이미 연결된 컨트롤의 연결을 끊습니다. 하이퍼링크를 사용하여 연결할 공급자에 대한 소비자 선택을 클릭하고 다양한 속성을 설정하는 효과를 확인합니다. 종료 단추 위에 마우스 포인터를 놓으면 사용자 지정 설명 텍스트가 도구 설명에 나타납니다.

설명

컨트롤과 함께 ConnectionsZone 사용되는 취소 동사는 사용자가 컨트롤에 대한 연결 지점을 선택하는 보기의 일부로 UI(연결 사용자 인터페이스)에 표시되는 영역 수준 동사입니다. 사용자가 취소 동사를 클릭하면 연결점 선택 프로세스가 취소되고 사용자가 클릭하여 새 연결을 설정할 수 있는 하이퍼링크에 연결 영역 보기가 반환됩니다.

속성을 CancelVerb 사용하여 UI에서 해당 WebPartVerb 개체에 대한 참조를 가져옵니다. 속성 자체는 읽기 전용이지만 동사에 대한 참조가 있으면 필요에 따라 속성 값을 변경할 수 있습니다.

요소의 태그 내에서 요소를 선언하여 <cancelverb> 취소 동사의 속성 값을 선언적으로 설정할 수 있습니다 <asp:connectionszone> . 동사의 속성은 개체의 속성WebPartVerb(예CancelVerb-Text: )인 형식 Property-Subproperty``Subproperty 에서 선언적으로 설정할 수 있습니다. 형태로 속성을 프로그래밍 방식으로 설정할 수도 있습니다 Property.Subproperty (예를 들어 CancelVerb.Text).

적용 대상

추가 정보