public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.CacheControl = "no-cache"; int userID = Fn.IsInt(Req.GetSession(LoginInfo.C_UserID), 0); string cou = "0"; if (userID > 0) { cou = User_Cart.GetUserCartN(userID).ToString(); } context.Response.Write(cou); }
protected void Page_Load(object sender, EventArgs e) { IMessage msgAjax = new MessageAjaxC(); int userID = Fn.IsInt(Req.GetSession(LoginInfo.C_UserID), 0); if (userID > 0) { cou = User_Cart.GetUserCartN(userID).ToString(); Dictionary <int, DataTable> dict = User_Cart.List(userID, LoginInfo.UserLevel, LoginInfo.UserIdentity); dtPro = dict[10]; totalPrice = double.Parse(dict[0].Rows[0]["TotalPrice"].ToString()); } msgAjax.AddMessage("cou", cou); msgAjax.AddMessage("html", Fn.GetControlHtml(this.cCart)); Response.Write(msgAjax.ReturnMessage); Response.End(); }
private void CheckCode() { bool b = true; string strCode = Req.GetQueryString("s"); string strCode1 = Req.GetSession("uverify"); if (strCode.Length == 0 || (string.Compare(strCode, strCode1, true) != 0)) { b = false; } if (b) { Response.Write('1');//正确 } else { Response.Write('0');//错误 } }