首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

关于response.write最简单的有关问题

2012-03-15 
关于response.write最简单的问题%@PageLanguage VB ContentType text/html ResponseEncoding gb2

关于response.write最简单的问题
<%@   Page   Language= "VB "   ContentType= "text/html "   ResponseEncoding= "gb2312 "   %>
<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 "   />
<title> 无标题文档 </title>
</head>
<body>
<%
Response.Write( " <table   width= "100% "   border= "1 "   cellspacing= "0 "   cellpadding= "0 ">
    <tr>
        <td> hello&nbsp; </td>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
    </tr>
    <tr>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
        <td> &nbsp; </td>
    </tr>
</table> ")
%>
</body>
</html>

这是我全部的代码
这是我第一个asp.net的程序,还望各位成全啊

[解决办法]
报错了没?
[解决办法]
"中间还有 "号,没有任何转义
[解决办法]
string a=@ " <table width= "100% " border= "1 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> hello&nbsp; </td>
<td> &nbsp; </td>
<td> &nbsp; </td>
</tr>
<tr>
<td> &nbsp; </td>
<td> &nbsp; </td>
<td> &nbsp; </td>
</tr>
</table> ";
Response.Write(a);
[解决办法]
你直接用html代码写这个表格不行吗??
[解决办法]

<%@ Page Language= "VB " ContentType= "text/html " ResponseEncoding= "gb2312 " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 无标题文档 </title>
</head>
<body>
<% Response.Write( " <table width= '100% ' border= '1 ' cellspacing= '0 ' cellpadding= '0 '> ") %>
<% Response.Write( " <tr> ")%>
<% Response.Write( " <td> hello&nbsp; </td> ")%>
<% Response.Write( " <td> &nbsp; </td> ")%>
<% Response.Write( " <td> &nbsp; </td> ")%>
<% Response.Write( " </tr> ")%>
<% Response.Write( " <tr> ")%>
<% Response.Write( " <td> &nbsp; </td> ")%>


<% Response.Write( " <td> &nbsp; </td> ")%>
<% Response.Write( " <td> &nbsp; </td> ")%>
<% Response.Write( " </tr> ")%>
<% Response.Write( " </table> ")%>
</body>
</html>


这样写就可以了
[解决办法]
支持楼上的

热点排行