示例#1
0
    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.GetFenXiangJL(nID);

            foreach (DataRow dr in dt.Rows)
            {
                string pri      = StringDelHTML.PriceToStringLow(Convert.ToInt32(dr["price"].ToString()));
                string nickname = StringDelHTML.Centers(dr["nickname"].ToString(), 6);
                //(" + dr["part"].ToString() + "%)
                sb.AppendLine("<dd>" + nickname + "(" + 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");
        }
    }