Is it wise with ASP to implement your own counter?
I mean in the Page_Load event I can increment a value of a field in a table by 1 each tims the page is loaded. (except if IsPostBack is True)
Thanks,
Printable View
Is it wise with ASP to implement your own counter?
I mean in the Page_Load event I can increment a value of a field in a table by 1 each tims the page is loaded. (except if IsPostBack is True)
Thanks,
I dont see why not.
I'm just thinking what if there is 100 people accessing the web site at the same time and there's 100 update calls to the database. Won't that slow down the loading of the web page?
Thanks,
You could store it in Cache and register a delegate callback to fire when the item is about to be removed and then write it to the db. You could also store it in the application state bag.