protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString() != "") { StringBuilder sb = new StringBuilder(); nID = Request.QueryString["uid"].ToString(); DataTable dt = tj.GetJxList(nID); foreach (DataRow dr in dt.Rows) { string pri = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["price"].ToString())); //(" + dr["part"].ToString() + "%) sb.AppendLine("<dd>" + dr["nickname"].ToString() + "(" + pri + ")<span>" + dr["CreateTime"].ToString() + "</span></dd>"); } if (string.IsNullOrEmpty(sb.ToString())) { sb.Append("<h1 style='text-align: center; margin-top: 20px'>这里什么也没留下 </h1>"); } liststr = sb.ToString(); } else { Response.Redirect("errors.html"); } }