Not knowing the exact number of labels needing to be created, I have created multiple instances of Linkbuttons "mLbtnPage" and have assigned each a different ID. On clicking a certain linklabel it successfully changes to gray. All the other linklabels are then supposed to turn blue. My method however only checks if the last created linklabel needs to be turned to blue instead of checking every label. I have been stuck on this for AGES and the only way I can think of tackling this problem is by sticking all the labels in a Gridview but Im hoping there is a simpler way!!

        protected void CreateSetOfLinklabels()
                for (int i = 1; i < miPages + 1; i++)
                    // Add label with corresponding page no
                    mLbtnPage = new LinkButton();
                    mLbtnPage.ID = i.ToString();
                    mLbtnPage.Text = i.ToString();
                    mLbtnPage.Click += new EventHandler(lbtnPage_Click);

                    Literal literalSpace = new Literal();
                    literalSpace.Text = "&nbsp; &nbsp;";

                    // Current page
                    if (Convert.ToInt32(mLbtnPage.ID) == miSelectedPage)
                        mLbtnPage.ForeColor = System.Drawing.Color.Gray;

        protected void lbtnPage_Click(object sender, EventArgs e)
            if (sender is LinkButton)
                LinkButton linkbutton = sender as LinkButton;
                miSelectedPage = int.Parse(linkbutton.ID);


                // Set properties of selected linkbutton
                linkbutton.ForeColor = System.Drawing.Color.Gray;

                // Create a table with the loaded details

        protected void SetDefaultLinkButtonProperties()
             // Return all other linklabels to default color
            mLbtnPage.ForeColor = mLbtnPage.ID != Convert.ToString(miSelectedPage) ? System.Drawing.Color.Blue : System.Drawing.Color.Gray;