다음을 통해 공유


WebPartManager.CanConnectWebParts 메서드

정의

연결에 참여할 WebPart 컨트롤을 확인하여 해당 컨트롤을 연결할 수 있는지 여부를 확인합니다.

오버로드

CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint)

공급자 및 소비자 컨트롤에 호환되는 인터페이스가 있고 WebPart 개체가 필요하지 않은 경우, 연결에 참여할 WebPartTransformer 컨트롤을 확인하여 해당 컨트롤을 연결할 수 있는지 여부를 확인합니다.

CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)

연결에 참여할 WebPart 컨트롤을 검사하여 해당 컨트롤을 연결할 수 있는지 여부를 확인하고, WebPartTransformer 개체를 사용하여 호환되지 않는 소비자와 공급자 간의 연결을 만듭니다.

설명

CanConnectWebParts 메서드는 두 컨트롤 WebPart 을 연결할 수 있는지 여부를 확인하는 데 사용됩니다. 이 메서드는 일반적으로 메서드를 호출 ConnectWebParts 하기 전에 조건부 검사로 사용됩니다.

이 메서드는 CanConnectWebParts 두 컨트롤이 연결을 형성하기 전에 충족해야 하는 여러 조건을 확인합니다. 다음 목록에서는 연결을 만들기 위한 기본 조건을 요약합니다. 이러한 모든 조건(일부 추가 내부 조건)이 충족되면 메서드가 반환 true됩니다. 즉, 컨트롤을 연결할 수 있습니다.

  • 공급자 및 소비자 컨트롤은 사용할 null수 없으며 속성에서 참조하는 컨트롤의 컬렉션에 WebParts 포함되어야 합니다.

  • 공급자와 소비자는 동일한 컨트롤일 수 없습니다. 즉, 컨트롤 자체에 WebPart 연결할 수 없습니다.

  • ConnectionPoint 공급자와 소비자 모두에 대한 개체(연결점)는 사용할 null수 없습니다.

  • 공급자와 소비자를 닫을 수 없습니다(컨트롤의 IsClosed 속성은 모두 닫을 true수 없음).

  • 연결점 컨트롤의 속성은 ControlType 소비자 및 공급자 모두의 컨트롤 형식과 일치해야 합니다.

  • 연결점을 모두 사용하도록 설정해야 합니다(해당 메서드는 GetEnabled 둘 다 반환 true해야 함).

  • 각 연결 지점은 자체 AllowsMultipleConnections 속성에 지정된 것보다 더 많은 연결을 형성하려고 시도해서는 안 됩니다.

  • 호환되지 않는 컨트롤을 WebPartTransformer 연결하기 위해 개체(변환기)가 필요한 경우 개체가 될 null수 없습니다. 그러나 컨트롤이 이미 호환되는 경우 변환기는 이어야 null합니다.

  • 변환기(사용되는 경우)는 컬렉션에서 AvailableTransformers 참조되어야 합니다.

  • 변환기(사용되는 경우)에는 두 컨트롤 간에 데이터를 변환할 수 있도록 공급자 및 소비자와 호환되는 인터페이스가 있어야 합니다. 소비자 및 공급자의 보조 인터페이스도 호환되어야 합니다.

CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint)

공급자 및 소비자 컨트롤에 호환되는 인터페이스가 있고 WebPart 개체가 필요하지 않은 경우, 연결에 참여할 WebPartTransformer 컨트롤을 확인하여 해당 컨트롤을 연결할 수 있는지 여부를 확인합니다.

public:
 bool CanConnectWebParts(System::Web::UI::WebControls::WebParts::WebPart ^ provider, System::Web::UI::WebControls::WebParts::ProviderConnectionPoint ^ providerConnectionPoint, System::Web::UI::WebControls::WebParts::WebPart ^ consumer, System::Web::UI::WebControls::WebParts::ConsumerConnectionPoint ^ consumerConnectionPoint);
public bool CanConnectWebParts (System.Web.UI.WebControls.WebParts.WebPart provider, System.Web.UI.WebControls.WebParts.ProviderConnectionPoint providerConnectionPoint, System.Web.UI.WebControls.WebParts.WebPart consumer, System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint consumerConnectionPoint);
member this.CanConnectWebParts : System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ProviderConnectionPoint * System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint -> bool
Public Function CanConnectWebParts (provider As WebPart, providerConnectionPoint As ProviderConnectionPoint, consumer As WebPart, consumerConnectionPoint As ConsumerConnectionPoint) As Boolean

매개 변수

provider
WebPart

컨트롤이 연결될 때 consumer에 데이터를 제공하는 컨트롤입니다.

providerConnectionPoint
ProviderConnectionPoint

provider가 연결에 참여할 수 있게 해 주는 ConnectionPoint입니다.

consumer
WebPart

컨트롤이 연결될 때 provider에서 데이터를 받는 컨트롤입니다.

consumerConnectionPoint
ConsumerConnectionPoint

consumer가 연결에 참여할 수 있도록 콜백 메서드 역할을 하는 ConnectionPoint입니다.

반환

Boolean

providerconsumer를 연결할 수 있는지 여부를 나타내는 부울 값입니다.

예제

다음 코드 예제에서는이 메서드를 사용 하는 방법에 설명 합니다.

코드 예제에는 다음 4개의 부분이 있습니다.

  • 웹 파트 페이지의 디스플레이 모드를 변경할 수 있게 해 주는 사용자 정의 컨트롤입니다.

  • 연결할 수 있는 두 개의 사용자 지정 WebPart 컨트롤, <asp:webpartmanager> 요소 및 메서드를 사용하여 CanConnectWebParts 연결을 만드는 일부 이벤트 처리 코드가 포함된 웹 페이지입니다.

  • 두 개의 사용자 지정 컨트롤과 사용자 지정 WebPart 인터페이스가 포함된 소스 코드 파일입니다.

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

코드 예제의 첫 번째 부분은 디스플레이 모드를 변경하기 위한 사용자 컨트롤입니다. 클래스 개요의 예제 섹션에서 사용자 컨트롤에 WebPartManager 대한 소스 코드를 가져올 수 있습니다. 표시 모드 및 사용자 컨트롤의 작동 방식에 대한 자세한 내용은 연습: 웹 파트 페이지에서 표시 모드 변경을 참조하세요.

웹 페이지의 선언적 태그에는 사용자 정의 컨트롤과 사용자 지정 컨트롤 모두에 대한 지시문이 포함되어 Register 있습니다. <asp:webpartmanager> 요소, <asp:webpartzone> 사용자 지정 컨트롤을 포함할 요소 및 <asp:connectionszone> 요소가 있습니다. 메서드에서 Page_Load 코드는 연결을 만들 수 있는지 여부를 확인하고, 이 경우 공급자, 소비자 및 해당 연결 지점을 정의한 다음 속성에서 참조하는 정적 연결 집합에 StaticConnections 새 연결을 추가합니다.

<%@ Page Language="C#" %>
<%@ register TagPrefix="uc1" 
  TagName="DisplayModeMenuCS" 
  Src="DisplayModeMenuCS.ascx" %>
<%@ register tagprefix="aspSample" 
  Namespace="Samples.AspNet.CS.Controls" 
  Assembly="ConnectionSampleCS"%>

<!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_Load(object sender, EventArgs e)
  {
    
    // Define provider, consumer, and connection points.
    WebPart provider = mgr.WebParts["zip1"];
    ProviderConnectionPoint provConnPoint =
      mgr.GetProviderConnectionPoints(provider)["ZipCodeProvider"];
    WebPart consumer = mgr.WebParts["weather1"];
    ConsumerConnectionPoint consConnPoint =
      mgr.GetConsumerConnectionPoints(consumer)["ZipCodeConsumer"];
    
    // Check whether the connection already exists.
    if (mgr.CanConnectWebParts(provider, provConnPoint,
      consumer, consConnPoint))
    {
      // Create a new static connection.
      WebPartConnection conn = new WebPartConnection();
      conn.ID = "staticConn1";
      conn.ConsumerID = "weather1";
      conn.ConsumerConnectionPointID = "ZipCodeConsumer";
      conn.ProviderID = "zip1";
      conn.ProviderConnectionPointID = "ZipCodeProvider";
      mgr.StaticConnections.Add(conn);
    }
 }

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <!-- Reference the WebPartManager control. -->
      <asp:WebPartManager ID="mgr" runat="server" />   
    <div>
      <uc1:DisplayModeMenuCS ID="displaymode1" 
        runat="server" />
      <!-- Reference consumer and provider controls 
           in a zone. -->
      <asp:WebPartZone ID="WebPartZone1" runat="server">
        <ZoneTemplate>
          <aspSample:ZipCodeWebPart ID="zip1" 
            runat="server" 
            Title="Zip Code Control"/>
          <aspSample:WeatherWebPart ID="weather1" 
            runat="server" 
            Title="Weather Control" />
        </ZoneTemplate>
      </asp:WebPartZone>
      <hr />
      <!-- Add a ConnectionsZone so users can connect 
           controls. -->
      <asp:ConnectionsZone ID="ConnectionsZone1" 
        runat="server" />
    </div>
    </form>
</body>
</html>
<%@ Page Language="vb" %>
<%@ register TagPrefix="uc1" 
  TagName="DisplayModeMenuVB" 
  Src="DisplayModeMenuVB.ascx" %>
<%@ register tagprefix="aspSample" 
  Namespace="Samples.AspNet.VB.Controls" 
  Assembly="ConnectionSampleVB"%>

<!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_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs)
    
    ' Define provider, consumer, and connection points.
    Dim provider As WebPart = mgr.WebParts("zip1")
    Dim provConnPoint As ProviderConnectionPoint = _
      mgr.GetProviderConnectionPoints(provider)("ZipCodeProvider")
    Dim consumer As WebPart = mgr.WebParts("weather1")
    Dim consConnPoint As ConsumerConnectionPoint = _
      mgr.GetConsumerConnectionPoints(consumer)("ZipCodeConsumer")
    
    ' Check whether the connection already exists.
    If mgr.CanConnectWebParts(provider, provConnPoint, _
      consumer, consConnPoint) Then
      ' Create a new static connection.
      Dim conn As New WebPartConnection()
      conn.ID = "staticConn1"
      conn.ConsumerID = "weather1"
      conn.ConsumerConnectionPointID = "ZipCodeConsumer"
      conn.ProviderID = "zip1"
      conn.ProviderConnectionPointID = "ZipCodeProvider"
      mgr.StaticConnections.Add(conn)
    End If
    
  End Sub
  
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
      <!-- Reference the WebPartManager control. -->
      <asp:WebPartManager ID="mgr" runat="server" />   
    <div>
      <uc1:DisplayModeMenuVB ID="displaymode1" 
        runat="server" />
      <!-- Reference consumer and provider controls 
           in a zone. -->
      <asp:WebPartZone ID="WebPartZone1" runat="server">
        <ZoneTemplate>
          <aspSample:ZipCodeWebPart ID="zip1" 
            runat="server" 
            Title="Zip Code Control"/>
          <aspSample:WeatherWebPart ID="weather1" 
            runat="server" 
            Title="Weather Control" />
        </ZoneTemplate>
      </asp:WebPartZone>
      <hr />
      <!-- Add a ConnectionsZone so users can connect 
           controls. -->
      <asp:ConnectionsZone ID="ConnectionsZone1" 
        runat="server" />
    </div>
    </form>
</body>
</html>

예제의 세 번째 부분은 컨트롤의 소스 코드입니다. 인터페이스와 두 개의 사용자 지정 WebPart 컨트롤이 포함되어 있으며, 하나는 공급자 역할을 하고 다른 하나는 소비자 역할을 합니다. 호환되는 연결점이 있기 때문에(둘 다 인터페이스를 IZipCode 인식함) 변환기는 연결을 만들 필요가 없습니다. 코드 예제를 실행하려면 이 소스 코드를 컴파일해야 합니다. 명시적으로 컴파일하고 결과 어셈블리를 웹 사이트의 Bin 폴더 또는 전역 어셈블리 캐시에 넣을 수 있습니다. 또는 런타임에 동적으로 컴파일되는 사이트의 App_Code 폴더에 소스 코드를 배치할 수 있습니다. 컴파일 방법을 보여 주는 연습은 연습 : 사용자 지정 웹 서버 컨트롤 개발 및 사용을 참조하세요.

namespace Samples.AspNet.CS.Controls
{
  using System;
  using System.Web;
  using System.Web.Security;
  using System.Security.Permissions;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public interface IZipCode
  {
    string ZipCode { get; set;}
  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class ZipCodeWebPart : WebPart, IZipCode
  {
    string zipCodeText = String.Empty;
    TextBox input;
    Button send;

    public ZipCodeWebPart()
    {
    }

    // Make the implemented property personalizable to save 
    // the Zip Code between browser sessions.
    [Personalizable()]
    public virtual string ZipCode
    {
      get { return zipCodeText; }
      set { zipCodeText = value; }
    }

    // This is the callback method that returns the provider.
    [ConnectionProvider("Zip Code", "ZipCodeProvider")]
    public IZipCode ProvideIZipCode()
    {
      return this;
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      input = new TextBox();
      this.Controls.Add(input);
      send = new Button();
      send.Text = "Enter 5-digit Zip Code";
      send.Click += new EventHandler(this.submit_Click);
      this.Controls.Add(send);
    }

    private void submit_Click(object sender, EventArgs e)
    {
      if (!string.IsNullOrEmpty(input.Text))
      {
        zipCodeText = Page.Server.HtmlEncode(input.Text);
        input.Text = String.Empty;
      }
    }
  }

  [AspNetHostingPermission(SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  [AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)]
  public class WeatherWebPart : WebPart
  {
    private IZipCode _provider;
    string _zipSearch;
    Label DisplayContent;

    // This method is identified by the ConnectionConsumer 
    // attribute, and is the mechanism for connecting with 
    // the provider. 
    [ConnectionConsumer("Zip Code", "ZipCodeConsumer")]
    public void GetIZipCode(IZipCode Provider)
    {
      _provider = Provider;
    }
    
    protected override void OnPreRender(EventArgs e)
    {
      EnsureChildControls();

      if (this._provider != null)
      {
        _zipSearch = _provider.ZipCode.Trim();
        DisplayContent.Text = "My Zip Code is:  " + _zipSearch;
      }
    }

    protected override void CreateChildControls()
    {
      Controls.Clear();
      DisplayContent = new Label();
      this.Controls.Add(DisplayContent);
    }
  }
}
Imports System.Web
Imports System.Web.Security
Imports System.Security.Permissions
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts

Namespace Samples.AspNet.VB.Controls

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Interface IZipCode

    Property ZipCode() As String

  End Interface

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Class ZipCodeWebPart
    Inherits WebPart
    Implements IZipCode
    Private zipCodeText As String = String.Empty
    Private input As TextBox
    Private send As Button

    Public Sub New()
    End Sub

    ' Make the implemented property personalizable to save 
    ' the Zip Code between browser sessions.
    <Personalizable()> _
    Public Property ZipCode() As String _
      Implements IZipCode.ZipCode

      Get
        Return zipCodeText
      End Get
      Set(ByVal value As String)
        zipCodeText = value
      End Set
    End Property

    ' This is the callback method that returns the provider.
    <ConnectionProvider("Zip Code", "ZipCodeProvider")> _
    Public Function ProvideIZipCode() As IZipCode
      Return Me
    End Function


    Protected Overrides Sub CreateChildControls()
      Controls.Clear()
      input = New TextBox()
      Me.Controls.Add(input)
      send = New Button()
      send.Text = "Enter 5-digit Zip Code"
      AddHandler send.Click, AddressOf Me.submit_Click
      Me.Controls.Add(send)

    End Sub


    Private Sub submit_Click(ByVal sender As Object, _
      ByVal e As EventArgs)

      If input.Text <> String.Empty Then
        zipCodeText = Page.Server.HtmlEncode(input.Text)
        input.Text = String.Empty
      End If

    End Sub

  End Class

  <AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  <AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
  Public Class WeatherWebPart
    Inherits WebPart
    Private _provider As IZipCode
    Private _zipSearch As String
    Private DisplayContent As Label

    ' This method is identified by the ConnectionConsumer 
    ' attribute, and is the mechanism for connecting with 
    ' the provider. 
    <ConnectionConsumer("Zip Code", "ZipCodeConsumer")> _
    Public Sub GetIZipCode(ByVal Provider As IZipCode)
      _provider = Provider
    End Sub


    Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
      EnsureChildControls()

      If Not (Me._provider Is Nothing) Then
        _zipSearch = _provider.ZipCode.Trim()
                DisplayContent.Text = "My Zip Code is:  " + _zipSearch
      End If

    End Sub

    Protected Overrides Sub CreateChildControls()
      Controls.Clear()
      DisplayContent = New Label()
      Me.Controls.Add(DisplayContent)

    End Sub

  End Class

End Namespace

브라우저에서 웹 페이지를 로드한 후 표시 모드 드롭다운 목록 컨트롤을 클릭하고 커넥트 선택하여 페이지를 연결 모드로 전환합니다. 커넥트 모드에서는 <asp:connectionszone> 요소를 사용하여 컨트롤 간에 연결을 만들 수 있습니다. 연결 모드에서 우편 번호 컨트롤의 제목 표시줄에서 아래쪽 화살표를 클릭하여 동사 메뉴를 활성화한 다음 커넥트 클릭합니다. 연결 UI(사용자 인터페이스)가 나타나면 메서드에 포함된 코드에 의해 연결이 이미 생성되었음을 알 수 Page_Load 있습니다.

설명

이 메서드는 개체가 필요하지 않도록 두 컨트롤에 호환되는 연결점 형식이 WebPartTransformer 있는 경우 연결하는 provider consumer 데 사용됩니다. 이 메서드를 사용하여 프로그래밍 방식 연결을 만들기 위해 호출 ConnectWebParts 하기 전에 두 개의 컨트롤을 연결할 수 있는지 확인할 수 있습니다.

이 오버로드는 메서드 오버로드와 동일한 구현을 CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer) 사용하며, 유일한 예외는 이 오버로드에 변환기가 필요하지 않다는 것입니다.

추가 정보

적용 대상

CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)

연결에 참여할 WebPart 컨트롤을 검사하여 해당 컨트롤을 연결할 수 있는지 여부를 확인하고, WebPartTransformer 개체를 사용하여 호환되지 않는 소비자와 공급자 간의 연결을 만듭니다.

public:
 virtual bool CanConnectWebParts(System::Web::UI::WebControls::WebParts::WebPart ^ provider, System::Web::UI::WebControls::WebParts::ProviderConnectionPoint ^ providerConnectionPoint, System::Web::UI::WebControls::WebParts::WebPart ^ consumer, System::Web::UI::WebControls::WebParts::ConsumerConnectionPoint ^ consumerConnectionPoint, System::Web::UI::WebControls::WebParts::WebPartTransformer ^ transformer);
public virtual bool CanConnectWebParts (System.Web.UI.WebControls.WebParts.WebPart provider, System.Web.UI.WebControls.WebParts.ProviderConnectionPoint providerConnectionPoint, System.Web.UI.WebControls.WebParts.WebPart consumer, System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint consumerConnectionPoint, System.Web.UI.WebControls.WebParts.WebPartTransformer transformer);
abstract member CanConnectWebParts : System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ProviderConnectionPoint * System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint * System.Web.UI.WebControls.WebParts.WebPartTransformer -> bool
override this.CanConnectWebParts : System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ProviderConnectionPoint * System.Web.UI.WebControls.WebParts.WebPart * System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint * System.Web.UI.WebControls.WebParts.WebPartTransformer -> bool
Public Overridable Function CanConnectWebParts (provider As WebPart, providerConnectionPoint As ProviderConnectionPoint, consumer As WebPart, consumerConnectionPoint As ConsumerConnectionPoint, transformer As WebPartTransformer) As Boolean

매개 변수

provider
WebPart

컨트롤이 연결될 때 consumer에 데이터를 제공하는 컨트롤입니다.

providerConnectionPoint
ProviderConnectionPoint

provider가 연결에 참여할 수 있도록 콜백 메서드 역할을 하는 ConnectionPoint입니다.

consumer
WebPart

컨트롤이 연결될 때 provider에서 데이터를 받는 컨트롤입니다.

consumerConnectionPoint
ConsumerConnectionPoint

consumer가 연결에 참여할 수 있도록 콜백 메서드 역할을 하는 ConnectionPoint입니다.

transformer
WebPartTransformer

호환되지 않는 providerconsumer를 연결할 수 있게 해 주는 WebPartTransformer입니다.

반환

Boolean

providerconsumer를 연결할 수 있는지 여부를 나타내는 부울 값입니다.

설명

이 메서드는 연결 provider 에 사용되며 consumer 두 컨트롤에 호환되지 않는 연결점 형식이 있는 경우 개체가 WebPartTransformer 필요합니다. 이 메서드를 사용하여 프로그래밍 방식 연결을 만들기 위해 호출 ConnectWebParts 하기 전에 두 개의 컨트롤을 연결할 수 있는지 확인할 수 있습니다.

이 오버로드는 메서드 오버로드와 동일한 구현을 CanConnectWebParts(WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint) 사용하며, 유일한 예외는 이 오버로드에 변환기가 필요하다는 것입니다.

적용 대상