title: how to databind three levels nested repeaters
body: <p>I have three nested repeaters, I have databind the first and the second but I can't figure out how to databind the third one my here is my markup:</p>
  
  <pre><code>&lt;asp:Repeater ID="mainMenuRepeater" runat="server"&gt;
              &lt;HeaderTemplate&gt;&lt;ul&gt;&lt;/HeaderTemplate&gt;
              &lt;ItemTemplate&gt;
  
              &lt;li&gt;&lt;a title='&lt;%#Eval("post_name")%&gt;' id='&lt;%#Eval("id")%&gt;'  href='&lt;%#ResolveUrl(Eval("post_permalink"))%&gt;'&gt;&lt;%# Eval("post_name")%&gt;&lt;/a&gt;
                  &lt;asp:Repeater ID="subMenuRepeater" runat="server"&gt;
                  &lt;HeaderTemplate&gt;&lt;ul&gt;&lt;/HeaderTemplate&gt;
                  &lt;ItemTemplate&gt;
  
                   &lt;li&gt;
                   &lt;a href='&lt;%#ResolveUrl(Eval("post_permalink"))%&gt;'&gt;&lt;%# Eval("post_name")%&gt;&lt;/a&gt;
  
                       &lt;asp:Repeater ID="sub_subMenuRepeater" runat="server"&gt;
                        &lt;HeaderTemplate&gt;&lt;ul&gt;&lt;/HeaderTemplate&gt;
                          &lt;ItemTemplate&gt;
                          &lt;li&gt;&lt;a href='&lt;%#ResolveUrl(Eval("post_permalink"))%&gt;'&gt;&lt;%# Eval("post_name")%&gt;&lt;/a&gt;&lt;/li&gt;
                        &lt;/ItemTemplate&gt;
                        &lt;FooterTemplate&gt;&lt;/ul&gt;&lt;/FooterTemplate&gt;
                       &lt;/asp:Repeater&gt;
                   &lt;/li&gt;
  
                  &lt;/ItemTemplate&gt;
                  &lt;FooterTemplate&gt;&lt;/ul&gt;&lt;/FooterTemplate&gt;
                  &lt;/asp:Repeater&gt;
              &lt;/li&gt;
              &lt;/ItemTemplate&gt;
              &lt;FooterTemplate&gt;&lt;/li&gt;
              &lt;br style="clear: left" /&gt;
              &lt;/FooterTemplate&gt;
              &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>And below is my code that databind the second repeater named subMenuRepeater:</p>
  
  <pre><code>Protected Sub mainMenuRepeater_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles mainMenuRepeater.ItemDataBound
          Try
              If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
  
                  'Dim dv As DataRowView = CType(e.Item.DataItem, DataRowView)
                  Dim ad As Int32 = CType(DataBinder.Eval(e.Item.DataItem, "id").ToString(), Int32)
                  Dim db As iwebmalldatacontextDataContext = New iwebmalldatacontextDataContext()
                  Dim menus = From m In db.iwebmall_posts
                              Where m.post_type = "page" And m.post_status = 1 And m.post_parent = ad Order By m.post_menu_order
                              Select m.post_permalink, m.post_name, m.id
  
                  Dim subMenu As Repeater = CType(e.Item.FindControl("subMenuRepeater"), Repeater)
                  If menus.Count &gt; 0 Then
                      With subMenu
                          .DataSource = menus
                          .DataBind()
                      End With
                  End If
  
              End If
  
  
  
  
          Catch ex As Exception
              '  Throw ex
          End Try
      End Sub
  </code></pre>
  
  <p>Please how can I databind the third on named sub_subMenuRepeater. Thanks in advance</p>