You can use jQuery to determine if a page is loaded very easily on the client side;
$(document).ready(function()
{
}
Server side: you can use a combination of WebMethod, JSON and Javascript (AJAX)
Client side concept:
//////INLINE YOUR ASPX PAGE
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function ConsumeWebService()
{
SampleService.TehMethod();
}
$(document).ready(function()
{
}
</script>
//////////////////
Server side concept:
<%@ WebService Language="C#" Class="SampleService" %>
using System;
using System.Web;
using System.Web.Services;
using System.Xml;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class SampleService: System.Web.Services.WebService
{
[WebMethod]
public void TehMethod()
{
}
}
Here is a more detailed article on the process http://msdn.microsoft.com/en-us/library/bb515101.aspx