我要在别的页面点击进入这个aspx页面的时候在将点击次数加1,但是结果我在进入这个页面然后刷新这个页面的时候也自加1了。请问是什么原因,源代码:
if (Page.IsPostBack==false)
{
string type = Request["type"];
string id = Request["id"];
if (type == "help")
{
panel_DCHelp.Visible = true;
this.Title = "帮助信息查看-- 编号为:" + id + "";
return;
}
if (type == "house")
{
panel_DCHouse.Visible = true;
this.Title = "帆远信息查看--编号为:" + id + "";
return;
}
if (type == "news")
{//新闻点击次数加1
new T_NewsTableAdapter().IncrClickTimes(Convert.ToInt64(id));
panel_DCNews.Visible = true;
this.Title = "新闻查看--编号为:" + id + "";
return;
}
}
if (Page.IsPostBack==false)
{
string type = Request["type"];
string id = Request["id"];
if (type == "help")
{
panel_DCHelp.Visible = true;
this.Title = "帮助信息查看-- 编号为:" + id + "";
return;
}
if (type == "house")
{
panel_DCHouse.Visible = true;
this.Title = "帆远信息查看--编号为:" + id + "";
return;
}
if (type == "news")
{//新闻点击次数加1
new T_NewsTableAdapter().IncrClickTimes(Convert.ToInt64(id));
panel_DCNews.Visible = true;
this.Title = "新闻查看--编号为:" + id + "";
return;
}
}