protected void btnSavePackageDetails_Click(object sender, EventArgs e) { if (txtPackageName.Text.Equals(Target, StringComparison.InvariantCultureIgnoreCase) == false) { bool packageNameUpdated; if (String.IsNullOrEmpty(Target) == true) { packageNameUpdated = AutoUpdateManager.CreatePackage(txtPackageName.Text); } else { packageNameUpdated = AutoUpdateManager.RenamePackage(Target, txtPackageName.Text); } if (packageNameUpdated == true) { Response.Redirect("EditPackage.aspx?target=" + Server.UrlEncode(txtPackageName.Text)); } else { cvPackageExists.IsValid = false; } } }