Good day guys!

I just want a little help on how to reference a repeater control in a function. Im using c#.net. My code below:

private void Load_Childrean_byTypeID(int TypeID, **repeatername reference here**)
        {
            SqlDataAdapter mycommand = new SqlDataAdapter("Select Id, FoamType_ChildName, ChildIcon_ClassName, ParentTypeID From tbl_ProductType_Children Where ParentTypeID = " + TypeID, Conn);
            DataSet ds = new DataSet();
            mycommand.Fill(ds);
            repeatername.DataSource = ds;
            repeatername.DataBind();
            mycommand.Dispose();
            ds.Dispose();
        }

A repeater reference should be put next on the TypeID specified in bold text.

Thank you!

using System.Web.UI.WebControls;

private void Load_Childrean_byTypeID(int TypeID, Repeater repeatername)
{
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.