protected void btnSaveChanges_Click(object sender, EventArgs e)
        {
            lblError.Text = "";

            if (String.IsNullOrEmpty(txtName.Text))
            {
                lblError.Text = "Please give the category a name";
                mpeError.Show();
                return;
            }

            if (!(txtName.Text == SelectedPortfolioCategory.Name))
            {
                if (DbObjects.Business.PortfolioCategory.PortfolioCategoryNameExists(txtName.Text))
                {
                    lblError.Text = "There is already another category with that name";
                    mpeError.Show();
                    return;
                }
            }

            SelectedPortfolioCategory.Name = txtName.Text;
            SelectedPortfolioCategory.Save();

            for (int i = 0; i < rptImages.Items.Count; i++)
            {
                RadioButton rdoThumbnail = (RadioButton)rptImages.Items[i].FindControl("rdoThumbnail");

                if (rdoThumbnail.Checked)
                {
                    SelectedPortfolioCategory.SetThumbnailImage(Convert.ToInt16(rdoThumbnail.Attributes["portfolioImageId"]));
                    break;
                }
            }

            BindCategory();
        }