內容顯示問題 我通過查詢表USER的信息需要通過Response.Write寫出來﹐怎么弄﹖﹖﹖要求如圖片格式 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Response.write("your user information"); 太惨了,,你把图片发到网络上去,在能浏览的情况下,用ubb把图片地址发到论坛里面来。。看不到你的图片!UBB: 打印的格式如上圖的樣式﹕只能用Response.Write 有用Response.Write()寫出我的內容﹐表頭好打印﹐表中間的數值需要怎么弄列﹐需要怎樣循環﹖﹖﹖請幫忙看看啊﹖﹖﹖﹖ 我的代碼如下﹕寫的有問題﹐達到上面圖片格式需要怎樣弄﹖﹖﹖﹖ 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>"); } } SqlDataReader picReader=csOp.ExecReader(strSql); picReader.Read(); Response.ContentType="application/octet-stream"; Response.BinaryWrite((Byte[])picReader["picContext"]); Response.End(); picReader.Close(); Cookie赋值问题 我用gridview编辑的时候,总是得不到编辑之后的内容 今天看到很多网站都是灰色的. 我也想把自己的小站改以下.请问这个代码要怎么改 如何在showModal窗口中 给父窗口中的 TextBox(服务器端控件) 赋值! 问个幼稚的问题呀,如何利用断点查找错误呀? 为什么在SQL里新建SQL注册时会出现sql server不存在或访问被拒绝 请教一个用户控件问题,大侠帮帮手啊 为什么有时会出现这种错误?有时又运行良好?! 这个验证怎么写??? 请问如何在主页上实现yahoo搜索? 关于异步给Session赋值问题 谁给帮看看,回答的好的给高分
UBB:
只能用Response.Write
請幫忙看看啊﹖﹖﹖﹖
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>"); } }
picReader.Read();
Response.ContentType="application/octet-stream";
Response.BinaryWrite((Byte[])picReader["picContext"]);
Response.End();
picReader.Close();