快速输入数据控件方案 asp.net c#

protected void DetailsView1_ItemInserting(object sender, DetailsViewInsertEventArgs e)
{
string xm = ((TextBox)this.DetailsView1.FindControl("TextBox1")).Text.Trim();
if (new olecado().baoancunzai(xm))
{
e.Cancel =true;
Response.Write("数据已经存在");
}
else
{
e.Cancel = false;
Response.Write("插入成功");
}

}

posted @ 2020-03-04 13:07  侯伟东  阅读(200)  评论(0编辑  收藏  举报