I searched for this topic but could not find any results, so I apologize in advance if this has been discussed previously.

The Country Restrictions section on the Shipping Methods page states that you must check the boxes for each country you want to restrict.  For the purposes of my current project, we are currently only shipping to North America but hope to expand in the future (so I don't want to remove the other countries).  I would like to add a "select all" link button next to the Country Restrictions header.

I have entered the following code in the aspx page....

<asp:LinkButton ID="btnCheckAll" Text="Select All" runat="server" OnClick="btnCheckAll_OnClick"/>

In the code behind file, I have created the following function...

        protected void btnCheckAll_OnClick(object sender, EventArgs e)
        {
            ShippingMethodCollection shippingMethodCollection = ShippingMethodManager.GetAllShippingMethods();
            foreach (GridViewRow row in gvShippingMethodCountryMap.Rows)
            {
                foreach (ShippingMethod shippingMethod in shippingMethodCollection)
                {
                    CheckBox cbRestrict = row.FindControl(String.Format("cbRestrict_{0}", shippingMethod.ShippingMethodID)) as CheckBox;
                    cbRestrict.Checked = true;
                }
            }
        }

However, when I run the page I get the following error...

CS1061: 'ASP.administration_modules_shippingmethodsfiltercontrol_ascx' does not contain a definition for 'btnCheckAll_OnClick' and no extension method 'btnCheckAll_OnClick' accepting a first argument of type 'ASP.administration_modules_shippingmethodsfiltercontrol_ascx' could be found (are you missing a using directive or an assembly reference?)

The error page also highlights my link button as being the cause of the error.

I'm having difficulty figuring out what exactly this means and how to fix it.  Can anyone offer any advice?