public void SaveProductType() { if (nameTextBox.Text == string.Empty) { ClientScript.RegisterStartupScript(this.GetType(), " ", "alert('Enter Product Type Name')", true); } else { aProductType.Name = nameTextBox.Text; String message = aProductTypeManager.SaveProductType(aProductType); ClientScript.RegisterStartupScript(this.GetType(), " ", "alert('" + message + "')", true); } nameTextBox.Text = string.Empty; }