当前位置: 代码迷 >> ASP.NET >> page_load()不起作用?该如何解决
  详细解决方案

page_load()不起作用?该如何解决

热度:6593   发布时间:2013-02-25 00:00:00.0
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 "%>
  相关解决方案