page_load()不起作用?
<%@ Page Language= "VB " AutoEventWireup= "false " CodeFile= "Default.aspx.vb " Inherits= "_Default " %>
<html xmlns= "http://www.w3.org/1999/xhtml " >
<head runat= "server ">
<title> 无标题页 </title>
</head>
<script runat= "server ">
Sub page_load()
Response.Write(Date.Now.ToString)
End Sub
</script>
<body>
<form id= "form1 " runat= "server ">
<div>
<%Response.Write(Date.Now.ToString)%>
<hr />
</div>
</form>
</body>
</html>
以上代码,按理说应该先执行page_load(),怎么没有执行呢?
谢谢!
[解决办法]
Sub Page_Load(ByVal src As Object, ByVal e As EventArgs)
[解决办法]
CodeFile= "Default.aspx.vb " Inherits= "_Default " 删除
<%@ Page Language= "VB " AutoEventWireup= "true "%>