我对asp.net 有一点问题。我正在尝试将功能直接编程到 ASP 页面中,但它失败了。
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
// My function
Sub print()
Response.Write("example")
End Sub%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
这是一个错误:
Línea 242:
Línea 243: #End ExternalSource
Línea 244: Me.__PageInspector_EndRenderTracing(New Object() {__w})
Línea 245: End Sub
Línea 246:
任何人都可以帮助我吗?提前致谢!