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("插入成功");
}
}