C# .net && asp.net 高手进 用StringBuilder.Append()输出表格
<h4><imgsrc="/theme/default/images/icon/work.png"/><%=ini.ReadValue("html","my_work")...
<h4><img src="/theme/default/images/icon/work.png"/> <%=ini.ReadValue("html", "my_work")%></h4>
<table width="450" align="center" border="0" cellspacing="1" cellpadding="0">
<tr>
<th ><%=ini.ReadValue("html", "case_management")%></th>
<td ><%=ini.ReadValue("html", "pending")%>(<a href="Case/Admin_Index.aspx">0</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">3</a>)</td>
<th ><%=ini.ReadValue("html", "learning_progress")%></th>
<td ><%=ini.ReadValue("html", "to_learn")%>(<a href="#" class="has">70%</a>) <%=ini.ReadValue("html", "already_learn")%>(<a href="#" class="has">30%</a>)</td>
</tr>
<tr>
<th><%=ini.ReadValue("html", "pub_case")%></th>
<td><%=ini.ReadValue("html", "pending")%>(<a href="#">3</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">0</a>)</td>
<th><%=ini.ReadValue("html", "blog_management")%></th>
<td><%=ini.ReadValue("html", "pending")%>(<a href="#">0</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">3</a>)</td>
</tr>
</table> 展开
<table width="450" align="center" border="0" cellspacing="1" cellpadding="0">
<tr>
<th ><%=ini.ReadValue("html", "case_management")%></th>
<td ><%=ini.ReadValue("html", "pending")%>(<a href="Case/Admin_Index.aspx">0</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">3</a>)</td>
<th ><%=ini.ReadValue("html", "learning_progress")%></th>
<td ><%=ini.ReadValue("html", "to_learn")%>(<a href="#" class="has">70%</a>) <%=ini.ReadValue("html", "already_learn")%>(<a href="#" class="has">30%</a>)</td>
</tr>
<tr>
<th><%=ini.ReadValue("html", "pub_case")%></th>
<td><%=ini.ReadValue("html", "pending")%>(<a href="#">3</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">0</a>)</td>
<th><%=ini.ReadValue("html", "blog_management")%></th>
<td><%=ini.ReadValue("html", "pending")%>(<a href="#">0</a>) <%=ini.ReadValue("html", "audited")%>(<a href="#" class="has">3</a>)</td>
</tr>
</table> 展开
展开全部
StringBuilder strbuilder = new StringBuilder();
strbuilder.Append("<h4><img src=\"/theme/default/images/icon/work.png\"/> ");
strbuilder.Append(ini.ReadValue("html", "my_work"));
strbuilder.Append("</h4>\r\n");
strbuilder.Append(" <table width=\"450\" align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\r\n");
strbuilder.Append(" <tr>\r\n");
strbuilder.Append(" <th >");
strbuilder.Append(ini.ReadValue("html", "case_management"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td >");
strbuilder.Append(ini.ReadValue("html", "pending"));
strbuilder.Append("(<a href=\"Case/Admin_Index.aspx\">0</a>) ");
strbuilder.Append("(<a href=\"#\" class=\"has\">3</a>)</td>\r\n");
strbuilder.Append(" \r\n");
strbuilder.Append(" <th >");
strbuilder.Append(ini.ReadValue("html", "learning_progress"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td >");
strbuilder.Append(ini.ReadValue("html", "to_learn"));
strbuilder.Append("(<a href=\"#\" class=\"has\">70%</a>) ");
strbuilder.Append(<ini.ReadValue("html", "already_learn"));
strbuilder.Append("(<a href=\"#\" class=\"has\">30%</a>)</td>\r\n");
strbuilder.Append(" </tr>\r\n");
strbuilder.Append(" <tr>\r\n");
strbuilder.Append(" <th>");
strbuilder.Append(ini.ReadValue("html", "pub_case"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td>");
strbuilder.Append(ini.ReadValue("html", "pending"));
strbuilder.Append("(<a href=\"#\">3</a>) ");
strbuilder.Append(ini.ReadValue("html", "audited"));
strbuilder.Append("(<a href=\"#\" class=\"has\">0</a>)</td>\r\n");
strbuilder.Append(" <th>");
strbuilder.Append(<ini.ReadValue("html", "blog_management"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td>");
strbuilder.Append(ini.ReadValue(\"html\", \"pending\"));
strbuilder.Append("(<a href=\"#\">0</a>) ");
strbuilder.Append(ini.ReadValue("html", "audited"));
strbuilder.Append("(<a href=\"#\" class=\"has\">3</a>)</td>\r\n");
strbuilder.Append(" </tr>\r\n");
strbuilder.Append(" </table>\r\n");
Response.Write(strbuilder);
strbuilder.Append("<h4><img src=\"/theme/default/images/icon/work.png\"/> ");
strbuilder.Append(ini.ReadValue("html", "my_work"));
strbuilder.Append("</h4>\r\n");
strbuilder.Append(" <table width=\"450\" align=\"center\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\r\n");
strbuilder.Append(" <tr>\r\n");
strbuilder.Append(" <th >");
strbuilder.Append(ini.ReadValue("html", "case_management"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td >");
strbuilder.Append(ini.ReadValue("html", "pending"));
strbuilder.Append("(<a href=\"Case/Admin_Index.aspx\">0</a>) ");
strbuilder.Append("(<a href=\"#\" class=\"has\">3</a>)</td>\r\n");
strbuilder.Append(" \r\n");
strbuilder.Append(" <th >");
strbuilder.Append(ini.ReadValue("html", "learning_progress"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td >");
strbuilder.Append(ini.ReadValue("html", "to_learn"));
strbuilder.Append("(<a href=\"#\" class=\"has\">70%</a>) ");
strbuilder.Append(<ini.ReadValue("html", "already_learn"));
strbuilder.Append("(<a href=\"#\" class=\"has\">30%</a>)</td>\r\n");
strbuilder.Append(" </tr>\r\n");
strbuilder.Append(" <tr>\r\n");
strbuilder.Append(" <th>");
strbuilder.Append(ini.ReadValue("html", "pub_case"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td>");
strbuilder.Append(ini.ReadValue("html", "pending"));
strbuilder.Append("(<a href=\"#\">3</a>) ");
strbuilder.Append(ini.ReadValue("html", "audited"));
strbuilder.Append("(<a href=\"#\" class=\"has\">0</a>)</td>\r\n");
strbuilder.Append(" <th>");
strbuilder.Append(<ini.ReadValue("html", "blog_management"));
strbuilder.Append("</th>\r\n");
strbuilder.Append(" <td>");
strbuilder.Append(ini.ReadValue(\"html\", \"pending\"));
strbuilder.Append("(<a href=\"#\">0</a>) ");
strbuilder.Append(ini.ReadValue("html", "audited"));
strbuilder.Append("(<a href=\"#\" class=\"has\">3</a>)</td>\r\n");
strbuilder.Append(" </tr>\r\n");
strbuilder.Append(" </table>\r\n");
Response.Write(strbuilder);
追问
strbuilder.Append(ini.ReadValue("html", "my_work"));
直接报错.
追答
出什么错说清楚
如果是ini.ReadValue这个出错的话
这个东西是你自己定义的,出什么错要看你自己的了
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
报什么错误?
追问
字符串过长,我加上符号""之后,直接输出的是ini.ReadValue("html", "my_work")
而不是调用了ini里面的东西
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询