protected void Button1_Click(object sender, EventArgs e) { if (DropDownList1.SelectedValue == "0" || DropDownList2.SelectedValue == "0" || txbDikaiol_Desc.Text.Length == 0) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Ελλιπή Στοιχεία !!!!');", true); } else { Dikaiolog.Insert(); } txbDikaiol_Desc.Text = ""; Dikaiolog.DataBind(); GridView12.DataBind(); }
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList2.SelectedValue != "0") { ABE_Category_Revers.DataBind(); GridView9.DataBind(); string DD2_index = DropDownList2.SelectedValue; DropDownList1.SelectedValue = GridView9.Rows[0].Cells[0].Text; ABE_Sub_Category.DataBind(); DropDownList2.DataBind(); DropDownList2.SelectedValue = DD2_index; } txbABE_Cat.Text = DropDownList1.SelectedValue.ToString(); txbABE_Sub.Text = DropDownList2.SelectedValue.ToString(); Dikaiolog.DataBind(); }