关于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 </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table> ")
%>
</body>
</html>
这是我全部的代码
这是我第一个asp.net的程序,还望各位成全啊
[解决办法]
报错了没?
[解决办法]
"中间还有 "号,没有任何转义
[解决办法]
string a=@ " <table width= "100% " border= "1 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> hello </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </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 </td> ")%>
<% Response.Write( " <td> </td> ")%>
<% Response.Write( " <td> </td> ")%>
<% Response.Write( " </tr> ")%>
<% Response.Write( " <tr> ")%>
<% Response.Write( " <td> </td> ")%>
<% Response.Write( " <td> </td> ")%>
<% Response.Write( " <td> </td> ")%>
<% Response.Write( " </tr> ")%>
<% Response.Write( " </table> ")%>
</body>
</html>
这样写就可以了
[解决办法]
支持楼上的