protected void addCatgButton_Click(object sender, EventArgs e) { Dictionary <string, object> inputDic = new Dictionary <string, object>(); inputDic.Add("pcatg_name", catgTextBox.Text.Trim()); inputDic.Add("pcolor1", color1TextBox.Text.Trim()); inputDic.Add("pcolor2", color2TextBox.Text.Trim()); inputDic.Add("pmake_by", "Admin"); string errorMsg = string.Empty; try { DataTable dt = linkManager.AddCategory(inputDic); errorMsg = "Successfully saved"; this.BindLinkCategory(); } catch (Exception ex) { errorMsg = "Error Occured. Enter input data properly"; } ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + errorMsg + "'); window.location='" + Request.ApplicationPath + "/UI/LinkEntry.aspx';", true); //Response.Redirect("LinkEntry.aspx"); }