We help IT Professionals succeed at work.
Get Started

Help with nested repeater and parameters

cdemott33 asked
Last Modified: 2012-05-11
I have a repeater called "myimages" that displays the name of an image and the image itself.  I need to nest another repeater (called myimagedetails) with the myimages repeater.  The myimagedetails contains a Grid.  

Is there a way to use a FUNCTION for my datasource of the nested myimagedetails repeater so I can pass a parameter?

The initial repeater has a value called "ImageID" that I'd like to pass via my fucntion.  The function would return a datatable based on the ImageID parameter and would load the Grid wtih the proper information.

Is this possible?  If so, could you provide me with an example of how I could achieve this?


Example below is as far as I've gotten.
<asp:Repeater ID="myimages" runat="server">
               <table class="style1">
                        Image Name: <%# DataBinder.Eval(Container.DataItem, "name")%>
                        <img alt="Picture" src="<%# DataBinder.Eval(Container.DataItem, "ImageURL")%>"  />
                        <asp:Repeater ID="myimagedetails" runat="server" DataBind=????????????????>
                                <asp:GridView ID="GridItemDetails" runat="server">

Open in new window

Watch Question
Consultant Software Engineer - .NET Architect
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE