title: Webpart Connections asp.net VB
body: <p>Im having the following problem with vb.net asp.net webparts. Im trying to create a static connection between webparts but im running into a problem, namely: </p>
  
  <blockquote>
    <p>Could not find the connection provider Web Part with ID 'Ucl_Diary_Summary1'</p>
  </blockquote>
  
  <p>I have the following defined as my iterface:</p>
  
  <pre><code>Public Interface IDiaryPartsProvider
  
      function Test as String
  
  End Interface
  </code></pre>
  
  <p>I have the following as my Consumer (UserControl):</p>
  
  <pre><code>Partial Class UsrCtrls_Diary_ucl_DiaryAwaitingReview
      Inherits System.Web.UI.UserControl
  
      &lt;ConnectionConsumer("Test", "myID")&gt; _
      Public Sub GetTextTransferInterface(ByVal provider As IDiaryPartsProvider)
          Dim a As String = provider.Test()
          UserMsgBox(a.ToString, Me.Page)
      End Sub
  
  End Class
  </code></pre>
  
  <p>I have the following defined as my Provider (UserControl):</p>
  
  <pre><code>Partial Class UsrCtrls_Diary_Diary_Summary
      Inherits System.Web.UI.UserControl
  
      Implements IWebPart, IDiaryPartsProvider
  
      &lt;ConnectionProvider("myID")&gt; _
      Public Function Test() As String Implements IDiaryPartsProvider.Test
          Return "this is a test"
      End Function
  End Class
  </code></pre>
  
  <p>I have my default.aspx as follows:</p>
  
  <pre><code>&lt;%@ Register Src="UsrCtrls/Diary/ucl_Diary_Summary.ascx" TagName="ucl_Diary_Summary"
      TagPrefix="uc4" %&gt;
  &lt;%@ Register Src="UsrCtrls/Diary/ucl_DiaryAwaitingReview.ascx" TagName="ucl_DiaryAwaitingReview"
      TagPrefix="uc5" %&gt;
  
  &lt;asp:WebPartManager ID="WebPartManager1" runat="server"&gt;
              &lt;StaticConnections&gt;
                  &lt;asp:WebPartConnection ID="cnn"
                  ConsumerID="Ucl_DiaryAwaitingReview1"
                  ProviderID="Ucl_Diary_Summary1"
                  /&gt;
              &lt;/StaticConnections&gt;
          &lt;/asp:WebPartManager&gt;
  
  &lt;asp:WebPartZone ID="zoneDiaryTopLeft" runat="server" EmptyZoneText="Add WebPart Here" DragHighlightColor="#454777" HeaderText=" "&gt;
  
                                      &lt;ZoneTemplate&gt;
                                      &lt;asp:Panel ID="pnl1" runat="server" title="Claims Awaiting Review"&gt;
                                      &lt;asp:UpdatePanel ID="udp_TopLeft" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional"&gt;
                                      &lt;ContentTemplate&gt;
                                          &lt;uc5:ucl_DiaryAwaitingReview ID="Ucl_DiaryAwaitingReview1" runat="server" title="Claims Awaiting Review" /&gt;
                                          &lt;/ContentTemplate&gt;
                                      &lt;/asp:UpdatePanel&gt;
                                      &lt;/asp:Panel&gt;
                                      &lt;/ZoneTemplate&gt;
  &lt;/asp:WebPartZone&gt;
  
  &lt;asp:WebPartZone ID="zoneDiaryTopRight" runat="server" EmptyZoneText="Add WebPart Here" DragHighlightColor="#454777" HeaderText=" "&gt;
                          &lt;ZoneTemplate&gt;
                          &lt;asp:Panel ID="PNL2" runat="server" title="Diary Summary"&gt;
                         &lt;asp:UpdatePanel ID="udp_TopRight" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional"&gt;
                          &lt;ContentTemplate&gt;
                              &lt;uc4:ucl_Diary_Summary ID="Ucl_Diary_Summary1" runat="server" Title="Diary Summary" /&gt;
                          &lt;/ContentTemplate&gt;
                          &lt;/asp:UpdatePanel&gt;
                          &lt;/asp:Panel&gt;
                          &lt;/ZoneTemplate&gt;
  &lt;/asp:WebPartZone&gt;
  </code></pre>
  
  <p>I can only assume its because I have my webparts - usercontrol wrapped in a panel (used for scrolling) and also an updatepanel which I use to refresh, so how do I get it to see the usercontrol?</p>
  
  <p>Thanks in advance.</p>
  
  <p>James.</p>