asp.net的response.write不能显示?

Aspx_hkx 2011-01-24 07:44:31
在asp.net中输入
<%Response.Write('it is a test')%>
可是浏览器中不能显示
怎么回事?

aspx文件源代码:
<%@ Page Language="C#" 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>pc-测试</title>
</head>

<body>
<%Response.Write('it is a test')%>
</body>

</html>


【说明】
谁可以解决我的问题,加100分!!!
不够可以追加!!!!
...全文
448 30 打赏 收藏 转发到动态 举报
写回复
用AI写文章
30 条回复
切换为时间正序
请发表友善的回复…
发表回复
Dragon_tk 2011-01-26
  • 打赏
  • 举报
回复

<%Response.Write("it is a test")%>

正解
双烟弥勒 2011-01-26
  • 打赏
  • 举报
回复
干嘛不在.cs文件里面写
回头是岸 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 teerhu 的回复:]
IIS 配置好了沒?
[/Quote]

跟iis没关系吧
teerhu 2011-01-26
  • 打赏
  • 举报
回复
IIS 配置好了沒?
O15013245O 2011-01-26
  • 打赏
  • 举报
回复
一个分号惹得祸
fengye0801 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 26 楼 chinaxthulang 的回复:]
引用 1 楼 wuyq11 的回复:
<body>
<%Response.Write("it is a test");%>
</body>

+1
[/Quote]
正解,你自己找找你IDE或者其他配置的原因吧。
rczjp 2011-01-26
  • 打赏
  • 举报
回复
单引号应该报错了,不是不显示
马老虎 2011-01-26
  • 打赏
  • 举报
回复
<%Response.Write("??????"); %>

测试没问题!
ChinaXtHuLang 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wuyq11 的回复:]
<body>
<%Response.Write("it is a test");%>
</body>
[/Quote]
+1
qjmay860909 2011-01-26
  • 打赏
  • 举报
回复
双引号非单引号啊!!
lcp147572931 2011-01-26
  • 打赏
  • 举报
回复
Response.Write("内容")
应该是双引号 是string类型
qiudong_5210 2011-01-26
  • 打赏
  • 举报
回复
<%Response.Write("it is a test" ); %>

分号,双引
t20100504t 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 wuyq11 的回复:]
<%Response.Write("it is a test");%>
没问题
[/Quote]+1
hitlcyu19 2011-01-26
  • 打赏
  • 举报
回复
不会有问题的 估计是你自己的问题
[Quote=引用 2 楼 winner2050 的回复:]

单引号是char类型。
你输入的是string类型。
语法错误。

<%Response.Write("it is a test");%>

双引号就得了
[/Quote]
nandy249407850 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 19 楼 slimboy123 的回复:]
<%Response.Write("it is a test");%>

为什么不用cs文件呢,没事找事做
[/Quote]
+1
slimboy123 2011-01-26
  • 打赏
  • 举报
回复
<%Response.Write("it is a test");%>

为什么不用cs文件呢,没事找事做
phil999 2011-01-26
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 aspx_hkx 的回复:]

【回复5楼】
我发现我的电脑所有asp.net的都用不了
为什么?难道我电脑有问题?
[/Quote]

是不是把 asp.net 扩展给禁止了
Aspx_hkx 2011-01-24
  • 打赏
  • 举报
回复
加我时说明“帮你解决asp.net问题”
Aspx_hkx 2011-01-24
  • 打赏
  • 举报
回复
可是我显示不了啊?
我QQ:834912844
加我吧,帮帮我!
wuyq11 2011-01-24
  • 打赏
  • 举报
回复
<%Response.Write("it is a test");%>
没问题
加载更多回复(7)

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧