If dal.ExecuteSql(sqlstr) Then
common.AlertMessage("评论成功")
G1DataBind()
Response.Redirect("PingLun.aspx?spmbm=" & bh)
End If这样可以防止刷新提交重复数据
但是问题是 不能弹出那个“评论成功”的对话框了请问着呢名解决?
谢谢!
common.AlertMessage("评论成功")
G1DataBind()
Response.Redirect("PingLun.aspx?spmbm=" & bh)
End If这样可以防止刷新提交重复数据
但是问题是 不能弹出那个“评论成功”的对话框了请问着呢名解决?
谢谢!
2 可以判断数据库是否已经存在这个纪录了
common.AlertMessage("评论成功")G1DataBind()
Page.RegesiterStartupScript("key","<script>location.href='PingLun.aspx?spmbm=" & hh & "</script>")
End If
{
ScriptManager.RegisterClientScriptBlock(this,this.GetType(),"","alert('添加成功')",true);
}
应该属于那个类的?
我这提示RegesiterStartupScript不是webui.page的成员
ScriptManager.RegisterStartupScript(Me, Me.GetType, "", "<script>location.href='PingLun.aspx?spmbm=" & bh & "</script>", True)但是好像不行,刷新还是重复提交。