Please don't write Connection string in every function.
Please create one global class or any other way so if you change the connection then you dont need to change it in every function. :)
Now you solution :
If you want less sever load then use caching, I want to say use one global class or table where whenever you upload a file the change the last upload date at that class or table and then show it on your page synchronously or asynchronously.asynchronously