syntax error in c# using repeaters

I have a repeater in my code which gets all the events in a particular month and then using the dates found in the database I have a nested repeater to search for all events in that date, then a further nested repeater searches to see if the events found have a value in a particular field.
I think its nearly working but i'm stuck with the syntax on the second repeater.

 foreach (RepeaterItem repeaterID in Repeaterday.Items)

i have an error that Repeaterday does not exist in the current context

I'm not sure what to change it to, i tried Dataset.Items which it doesnt like either

Please help!
protected void Page_Load(object sender, EventArgs e)
        object result = null;
        string monthID = Request["Month"];
        Monthfixtureslabel.Text = "Fixtures for " + monthID;
        SqlCommand mySqlSelectMonth = new SqlCommand("exec usp_GetAllMonthFixtures @monthID", conn);
        mySqlSelectMonth.Parameters.Add("MonthID", SqlDbType.NVarChar);
        mySqlSelectMonth.Parameters["MonthID"].Value = monthID;
        mySqlSelectMonth.CommandType = CommandType.Text;
        SqlDataAdapter mySqlAdapterMonth = new SqlDataAdapter(mySqlSelectMonth); 
        DataSet MonthDataSet = new DataSet();
        RepeaterMonth.DataSource = MonthDataSet;
        int k = 0;
        foreach (RepeaterItem repeaterItem in RepeaterMonth.Items)
            string date = MonthDataSet.Tables[0].Rows[k]["Date"].ToString();
                SqlCommand mySqlSelect = new SqlCommand("exec usp_GetTestMonthFixtures @monthID, @Date", conn);
                mySqlSelect.Parameters.Add("MonthID", SqlDbType.NVarChar);
                mySqlSelect.Parameters["MonthID"].Value = monthID;
                mySqlSelect.Parameters.Add("Date", SqlDbType.NVarChar);
                mySqlSelect.Parameters["Date"].Value = date;
                mySqlSelect.CommandType = CommandType.Text;
                SqlDataAdapter mySqlAdapter = new SqlDataAdapter(mySqlSelect); 
                DataSet DataSet = new DataSet();
                ((Repeater)(repeaterItem.FindControl("Repeaterday"))).DataSource = DataSet;
                int l = 0;
                foreach (RepeaterItem repeaterID in Repeaterday.Items)
                    Guid tempID = (Guid) MonthDataSet.Tables[0].Rows[l]["ID"];
                        SqlCommand mySqlSelectAM = new SqlCommand("exec usp_GetMonthAllAMFixtures @ID", conn);
                        mySqlSelectAM.Parameters.Add("ID", SqlDbType.UniqueIdentifier);
                        mySqlSelectAM.Parameters["ID"].Value = tempID;
                        mySqlSelectAM.CommandType = CommandType.Text;
                        SqlDataAdapter mySqlAdapterAM = new SqlDataAdapter(mySqlSelectAM);
                        DataSet AMDataSet = new DataSet();
                        if (AMDataSet.Tables[0].Rows.Count <= 0)
                            AMDataSet.Tables[0].Rows.Add(new object[] { "No events", "" });
                        ((Repeater)(repeaterItem.FindControl("RepeaterAM"))).DataSource = AMDataSet;
                        SqlCommand mySqlSelectPM = new SqlCommand("exec usp_GetMonthAllPMFixtures @ID", conn);
                        mySqlSelectPM.Parameters.Add("ID", SqlDbType.NVarChar);
                        mySqlSelectPM.Parameters["ID"].Value = tempID;
                        mySqlSelectPM.CommandType = CommandType.Text;
                        SqlDataAdapter mySqlAdapterPM = new SqlDataAdapter(mySqlSelectPM);
                        DataSet PMDataSet = new DataSet();
                        if (PMDataSet.Tables[0].Rows.Count <= 0)
                            PMDataSet.Tables[0].Rows.Add(new object[] { "No events", "" });
                        ((Repeater)(repeaterItem.FindControl("RepeaterPM"))).DataSource = PMDataSet;
                        SqlCommand mySqlSelectClub = new SqlCommand("exec usp_GetMonthAllClubFixtures @ID", conn);
                        mySqlSelectClub.Parameters.Add("ID", SqlDbType.NVarChar);
                        mySqlSelectClub.Parameters["ID"].Value = tempID;
                        mySqlSelectClub.CommandType = CommandType.Text;
                        SqlDataAdapter mySqlAdapterClub = new SqlDataAdapter(mySqlSelectClub);
                        DataSet ClubDataSet = new DataSet();
                        if (ClubDataSet.Tables[0].Rows.Count <= 0)
                            ClubDataSet.Tables[0].Rows.Add(new object[] { "No events", "" });
                        ((Repeater)(repeaterItem.FindControl("RepeaterClub"))).DataSource = ClubDataSet;

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I see you access RepeaterDay   through the FindControl method above your call to your foreach loop.     I would say you have two options.

First is you could change your foreach loop to use ((Repeater)(repeaterItem.FindControl("Repeaterday"))).Items

Create a variable for Repeater day,   set it equal to (Repeater)(repeaterItem.FindControl("Repeaterday")  
then update your foreach loop to that new variable.items.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CharlieDevAuthor Commented:
Great thanks :)
CharlieDevAuthor Commented:
cheers :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.