62,074
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
HttpCookie cookie = Request.Cookies["Info"];
if (cookie != null)
{
Response.Write("false");
Response.End();
}
else
Bind();
}
}
public void Bind()
{
int id = Convert.ToInt32(Request.QueryString["ID"]);
HttpCookie cookie = new HttpCookie("Info");
cookie.Values["UserIP"] = Common.GetUserIpAddress();
cookie.Values["UserTime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
cookie.Expires = DateTime.Now.AddDays(1);
DbProvider.Instance().UpdateDataTableHit("DS_Video", "Dig", id);
DataTable dt = DbProvider.Instance().GetSingleVideo(id);
if (dt.Rows.Count > 0 && dt != null)
{
Response.Write(dt.Rows[0]["Dig"].ToString() + cookie.Values["UserIP"].ToString() + cookie.Values["UserTime"].ToString());
Response.End();
}
dt.Clear();
dt.Dispose();
}
function SetUp(id)
{
createXMLHTTP();
var up = document.getElementById("Up");
var url="/Video/AjaxUp.aspx?ID="+id+"&math="+Math.random()*10+990;
xmlHttp.open("get",url,true);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
alert(xmlHttp.responseText);
}
}
}
xmlHttp.send(null);
}
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["Info"];
if (cookie != null)
{
Response.Write("false");
Response.End();
}
else
Bind();
}
我把那个去掉还是一样继续执行bind()事件额