Пример #1
0
 protected void imgAdd_Click(object sender, EventArgs e)
 {
     if (txtfenleiName.Text == "" || txtnum.Text == "")
     {
         ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('请输入!')</script>");
         return;
     }
     if (newshepler.addNewsClass(txtfenleiName.Text.Trim(), txtnum.Text.Trim()))
     {
         //ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('添加成功!')</script>");
         tab.Visible = false;
         GridBind();
     }
     else
     {
         ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('添加失败!')</script>");
         return;
     }
 }