日期:2014-05-17  浏览次数:20407 次

帮我看看这段代码为什么打开报错啊
C# code
<%@ Page Language="C#" AutoEventWireup="true" validateRequest="false"%>
<html>
<head runat="server">
<title>节奏</title>

<script language="c#" runat="server">

Response.Write("小伙子");

</script>
</head>

<body style="font-size:12px;font-weight:bold;color:#00FF00;font-family:Arial, Helvetica, sans-serif;background-color:#000000;">
</body>
</html>


------解决方案--------------------
小伙子,要这样写

HTML code

<%@ Page Language="C#" AutoEventWireup="true" 

validateRequest="false"%>
<html>
<head runat="server">
<title>节奏</title>

<script language="c#" runat="server">
private void page_load(object sender,EventArgs e){
Response.Write("小伙子");
}
</script>
</head>

<body style="font-size:12px;font-weight:bold;color:#00FF00;font-

family:Arial, Helvetica, sans-serif;background-color:#000000;">
</body>
</html>