Call a function for each webform
-
is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.
You get a better response if you ask this question in the ASP.NET forum. AFAIK, there is no event that fires for every request in every session.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.
1. Create base page that calls the function. 2. Have all your pages inherit off of the base page.
Mike Lasseter
-
is there any way to call function automatically when webforms loads without writing each time code at page load of each webforms.
Create the function in a seperate module/class (depending on your requirement) and make the method call at page load, e.g.
Protected Sub Page_Load....
Dim MyClass1 As New MyClass 'declare the class
MyClass.DoFunction() 'do the work
End SubIs that what you mean? Agree with Dave Kreskowiak - this topic is better off in ASP forum.