I am doing a small project on ASP.NET Framework and was wondering if it was possible to call a certain method when the website loads.
Asked
Active
Viewed 112 times
0
-
There's a difference between when the site loads on user's browser (that is, in response to a request) and the site itself getting loaded by IIS (maybe just once in a day or so if it lives on your own VM, might be multiple time if the hosting kill idle sites). Which one do you want? – Martheen Apr 13 '20 at 08:44
-
I think when a site loads.. I want to seed the database on application start basically but all I finding online is how to do it using .core, which is not good for me since im using .net framework. Thanks – Rick Astley Apr 13 '20 at 08:53
-
Seeding already exist pre-core, like [this question](https://stackoverflow.com/questions/30485649/entity-framework-seed-not-working) shows – Martheen Apr 13 '20 at 08:57