Do you want to call the function right after the page loads in the browser (client side) or right after the page loads on the server (server side)?
It seems to me that you want to call the function IN your PageLoad method (the last line in the method).
If you want to post back to the server right after the page loads in the browser...You could look into implementing the
IPostBackDataHandler Interface for the ASP.NET page.
Then Override the OnInit method and specify that Page is registered requires postback....
eg
-
Protected Overrides Sub OnInit(ByVal e As EventArgs)
-
InitializeComponent()
-
MyBase.OnInit(e)
-
If Not Page Is Nothing Then
-
Page.RegisterRequiresPostBack(Me)
-
End If
-
-
End Sub
You'll have to specify exactly what should be done when the page posts back in the code that you need to write in order to implement the IPostBackDataHandler interface.
-Frinny