我通過查詢表USER的信息需要通過Response.Write寫出來﹐怎么弄﹖﹖﹖要求如圖片格式

解决方案 »

  1.   

    Response.write("your user information");
      

  2.   

    太惨了,,你把图片发到网络上去,在能浏览的情况下,用ubb把图片地址发到论坛里面来。。看不到你的图片!
    UBB:
      

  3.   

    打印的格式如上圖的樣式﹕
    只能用Response.Write
      

  4.   

    有用Response.Write()寫出我的內容﹐表頭好打印﹐表中間的數值需要怎么弄列﹐需要怎樣循環﹖﹖﹖
    請幫忙看看啊﹖﹖﹖﹖
      

  5.   

    我的代碼如下﹕寫的有問題﹐達到上面圖片格式需要怎樣弄﹖﹖﹖﹖
     protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                //查詢條件定義
                string Month = Request.QueryString["Month"];
                string Check = Request.QueryString["Check"];
                string Area = Request.QueryString["Area"];            DataSet ds = new DataSet();
                ds = (new Report()).SelectLeaseMxiReport(Month, Check, Area);
                DataTable dt = ds.Tables["EXPENSE"];
                if (dt.DefaultView.Count < 0)
                {
                    Response.Write("<script>alert('沒有相關信息﹐請輸入正確的查詢信息﹗')</script>");
                    return;
                }
                else
                { }
                    for (int i = 0; i <= dt.Rows.Count - 1; i++)
                    {
                        string Bunk = (string)dt.Rows[i]["LEASE_BUNK"].ToString();
                        string Rent = (string)dt.Rows[i]["EXP_RENT"].ToString();
                        string ClEAN_GO = (string)dt.Rows[i]["EXP_CLEAN_GO"].ToString();
                        string CLEAN = (string)dt.Rows[i]["EXP_CLEAN"].ToString();
                        string ELECTR = (string)dt.Rows[i]["EXP_ELECTR"].ToString();
                        string WC = (string)dt.Rows[i]["EXP_WC"].ToString();
                        string MAG = (string)dt.Rows[i]["EXP_MAG"].ToString();
                        string XJ = (string)dt.Rows[i]["EXP_XJ"].ToString();
                        string PAY = (string)dt.Rows[i]["CLEAR_PAY"].ToString();
                        string WATER = (string)dt.Rows[i]["EXP_WATER"].ToString();
                        string expELECTR = (string)dt.Rows[i]["EXP_ELECTR"].ToString();
                        string OTHER = (string)dt.Rows[i]["EXP_OTHER"].ToString();
                        string XJA = (string)dt.Rows[i]["EXP_XJA"].ToString();
                        string HJ = (string)dt.Rows[i]["EXP_HJ"].ToString();
                        string NOTES = (string)dt.Rows[i]["EXP_NOTES"].ToString();
                        Response.Write(" " +                                 "  <table style='FONT-SIZE: 9pt' height='20' cellSpacing='0' cellPadding='0' width='100%' border='0' id='table9'>" +
                               "<tr align='center'>" +
                                  " <td colSpan='2'>" +
                                  " <h3>裕元工業區商鋪2008年04月(全部)費用明細表</h3>" +
                                   "</td>" +
                              " </tr>" +
                              " <tr>" +
                              "     <td>列印日期:2008/4/18上午 09:06:18</td>" +
                              "     <td align='right'>頁1之1</td>" +
                              " </tr>" +
                           "</table>" +
                          " <table style='FONT-SIZE: 9pt; BORDER-LEFT-COLOR: black; BORDER-BOTTOM-COLOR: black; BORDER-TOP-COLOR: black; BORDER-COLLAPSE: collapse; BORDER-RIGHT-COLOR: black' borderColor='black' cellSpacing='0' cellPadding='0' rules='all' width='98%' border='1' id='table10'>" +
                             "  <tr align='center'>" +
                             "      <td noWrap rowSpan='2' width='5%'>鋪號</td>" +
                             "      <td colSpan='7'>2008年5月份收入</td>" +
                             "      <td colSpan='8'>2008年04月份收入</td>" +
                             "      <td rowSpan='2' width='6%'>合計</td>" +
                             "      <td rowSpan='2' width='12%'>備注</td>" +
                             "  </tr>" +
                             "  <tr align='center'>" +
                             "      <td noWrap width='5%'>租金 </td>" +
                             "      <td width='6%'>垃圾<br>清運費</td>" +
                             "      <td width='5%'>清潔費</td>" +
                             "      <td width='5%'>廁衛費</td>" +
                             "      <td width='5%'>管理費</td>" +
                             "      <td noWrap width='4%'>其它</td>" +
                             "      <td noWrap width='5%'>小計</td>" +
                             "      <td noWrap width='5%'>租金</td>" +
                             "      <td width='5%'>垃圾<br>清運費</td>" +
                             "      <td width='5%'>清潔費</td>" +
                             "      <td width='5%'>排污費</td>" +
                             "      <td noWrap width='5%'>水費</td>" +
                             "      <td noWrap width='5%'>電費</td>" +
                             "      <td noWrap width='5%'>其它</td>" +
                             "      <td noWrap width='5%'>小計</td>" +
                             "  </tr>" +
                             "  </table>" +
                             "  <table  style='FONT-SIZE: 9pt; BORDER-LEFT-COLOR: black; BORDER-BOTTOM-COLOR: black; BORDER-TOP-COLOR: black; BORDER-COLLAPSE: collapse; BORDER-RIGHT-COLOR: black' borderColor='black' cellSpacing='0' cellPadding='0' rules='all' width='98%' border='1' id='table11'>" +
                             "  <tr align='center'>" +
                             "      <td width=5%'>" + Bunk + "</td>" +
                             "      <td width='5%'>" + Rent + "</td>" +
                             "      <td width='6%'>" + ClEAN_GO + "</td>" +
                             "      <td width='5%'>" + CLEAN + "</td>" +
                             "      <td width='5%'>" + WC + "</td>" +
                             "      <td width='4%'>" + MAG + "</td>" +
                             "      <td width='5%'>   </td>" +
                             "      <td width='5%'>" + XJ + "</td>" +
                             "      <td width='5%'> </td>" +
                             "      <td width='5%'> </td>" +
                             "      <td width='5%'> </td>" +
                             "      <td width='5%'>" + PAY + "</td>" +
                             "      <td width='5%'>" + WATER + "</td>" +
                             "      <td width='5%'>" + ELECTR + "</td>" +
                             "      <td width='5%'>" + OTHER + "</td>" +
                             "      <td width='5%'>" + XJA + "</td>" +
                             "      <td width='6%'>" + HJ + "</td>" +
                             "      <td width='12%'>" + NOTES + "</td>" +
                             "  </tr>" +
                             " </table>" +
                             " <table width='98%' style='FONT-SIZE: 9pt; BORDER-LEFT-COLOR: black; BORDER-BOTTOM-COLOR: black; BORDER-TOP-COLOR: black; BORDER-COLLAPSE: collapse; BORDER-RIGHT-COLOR: black' borderColor='black' cellSpacing='0' cellPadding='0' rules='all'  border='1' id='table12'>" +
                             "   <tr align='center'>" +
                             "       <td width='5%'>合計</td>" +
                             "       <td>18694.45</td>" +
                             "   </tr>" +
                             "   <tr align='center'>" +
                             "       <td width='5%'>總計</td>" +
                             "       <td>18694.45</td>" +
                             "   </tr>" +
                            " </table>" +
                            "<table style='FONT-SIZE: 9pt; BORDER-LEFT-COLOR: black; BORDER-BOTTOM-COLOR: black; BORDER-TOP-COLOR: white; BORDER-COLLAPSE: collapse; BORDER-RIGHT-COLOR: black' borderColor='black' cellSpacing='0' cellPadding='0' rules='all' width='98%' border='1' id='table13'>" +
                             "  <tr>" +
                             "       <td> </td>" +
                             "  </tr>" +
                             "  <tr>" +
                             "      <td noWrap width='40%'>主管﹕</td>" +
                             "      <td noWrap width='40%'>審核﹕</td>" +
                             "      <td align='left' width='20%'>制表﹕</td>" +
                             "  </tr>" +
                             "</table>");            }        }
      

  6.   

    SqlDataReader picReader=csOp.ExecReader(strSql);
    picReader.Read();

    Response.ContentType="application/octet-stream"; 
    Response.BinaryWrite((Byte[])picReader["picContext"]); 
    Response.End(); 
    picReader.Close();