views:

14

answers:

1

I simply chose an asp.net ajax web form, and I was presented with a page similar to the below mentioned one:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AppReport.aspx.vb" Inherits="ism2_AppReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head runat="server">
    <title></title>

    <script type="text/javascript">

        function pageLoad() {
            alert();
        }

    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    </div>
    </form>
</body>
</html>

I don't understand how the pageLoad executes. How to disable it?

A: 

pageLoad is just a short-hand of the following:

Sys.Application.add_load(function() { 
    // pageload 
}); 

It is being called by the ASP.NET AJAX framework. If you don't need it, you can just remove it.

Alexander Gyoshev