protected void Page_Load(object sender, EventArgs e) { //Session["FromUserName"] = "******"; //Session["ToUserName"] = "******"; if (!IsPostBack) { Base(); if ((Request.QueryString["FromUserName"] != null || Session["FromUserName"] != null) && (Request.QueryString["ToUserName"] != null || Session["ToUserName"] != null)) { string user = Request.QueryString["FromUserName"] == null ? Session["FromUserName"].ToString() : Request.QueryString["FromUserName"].ToString(); string user2 = Request.QueryString["ToUserName"] == null ? Session["ToUserName"].ToString() : Request.QueryString["ToUserName"].ToString(); Session["FromUserName"] = user; Session["ToUserName"] = user2; unique.Value = user; ticket.Value = ""; MySmallShopService mss = new MySmallShopService(); Hmj.Entity.Callback cb = mss.GetCallbackByFromUserName(user); if (cb != null) { ticket.Value = cb.Ticket; } } } }