protected void SubAdd_Click(object sender, EventArgs e) { int id = 0 ; string check = Request["hidden_text"]; string GetValue = SubText.Text; Int32 Show = (SubCheck.Checked == true ? 1 : 0); if (check == "true" && GetValue != "") { id = Convert.ToInt32(main_category.Text); sql_object sql_obj = new sql_object(); sql_obj.SubCatAdd(id, GetValue, Show); sub_Category_query(id); } }