为什么是自动加2,而不是自动加1
我想浏览一个页面,然后自动加1,可以不防止刷新,但为什么老是自动加2啊?代码如下,高手,请指教
SqlConnection con1=DB.CreateCon();
con1.Open();
SqlCommand cmd1=new SqlCommand();
cmd1.Connection=con1;
cmd1.CommandText="update CataLogContent set Countpeople=Countpeople+1 where NewsID="+ContentID;
cmd1.ExecuteNonQuery();
con1.Close();