We help IT Professionals succeed at work.
Get Started

datalist, repeater, nested

R8VI
R8VI asked
on
631 Views
Last Modified: 2013-12-17
Hi,

I have a datalist within there i havea repeater. is a nested repeater I want to know how i can bind the data in the repeater as i dont want an actual SQL data source on the apge i want to bing it from a datatable.

Code below.

Please help

Thanks,

R8VI
aspx page
                               <ItemTemplate>
                                    <asp:Repeater ID="rptImage" runat="server">
                                        <ItemTemplate>
                                           

                                                <img border="0" width="25px" alt="image" height="25px" src='<%# DataBinder.Eval(Container, "DataItem.PictureName")%>' />
                                            </a>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </ItemTemplate>

c# code on rowdatabind of the datalist


 protected void BindingRepeater_RowDataBound(object sender, GridViewRowEventArgs e)
        {
             DataSet dsAllImages = new DataSet();
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                string x = DataBinder.Eval(e.Row.DataItem, "ArID").ToString();
                dsAllImages = GetAllImages(Convert.ToInt32(x));

          
            }

           

        }

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 9 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