日期:2014-05-18  浏览次数:20532 次

ASP.Net在本机显示问题,在线等,急急急,高手请进,菜鸟提问!!!!
<%@   Page   Language= "VB "   ContentType= "text/html "   ResponseEncoding= "gb2312 "   %>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "   "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> Untitled   Document </title>
</head>
<body>
<%
Response.Write( "Hello   World ")
%>
tttttttttttttt
</body>
</html>
以上是我用DreamWeaver写显示Hello   World的简单程序,但是Hello   World显示不出来,仅仅能显示ttttttttttttt。
这段程序我是以aspx保存的,在IE中以http://127.0.0.1/sunkaiasp/hao/01.aspx打开的,在IIS中是存储在C:\Inetpub\wwwroot\sunkaiasp\hao目录下的,为什么Response.Write显示不出来呢。
请高手帮忙,谢谢了。

------解决方案--------------------
lz以前是搞ASP得吧....
asp.net一般不推荐直接把代码前在代码里面 如果实在要嵌在代码里要有一个runat=server的form

<%@ Page Language= "C# " %>

<!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 runat= "server ">
<title> 无标题页 </title>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<%Response.Write( "Hello1 "); %>
</div>
</form>
</body>
</html>