What is the difference when giving the connection in Web.config and inside a class
What is the difference when giving the connection in Web.config and inside a class
Connection string exposed in web.config file is accesible in all application clases and can be shared.
There are various advantages of putting a connectino in Web.config like
1. You can easily change the connectionstring in an application by changing just a single file ie. web.config
2. To get the connectionstring u hav no need to create an instance of any object which otherwise could consume a bit of memory
There can be many others as well...
---V V---
Vikas Vaidya
(If u found the quote useful then pls mark it as thanks)
Thanks 4 ur reply