G
Guest
If you have ASP.Net pages that contain multiple user controls and reference
multiple classes, is it better to:
1. Open a single connection and pass it around to all objects that need to
access data, or
2. Open a connection within each individual control, page, or class for
internal usage, or
3. Open a connection each time data needs to be accessed?
If 1 or 2, how do you make sure the connection gets closed? Thanks!
multiple classes, is it better to:
1. Open a single connection and pass it around to all objects that need to
access data, or
2. Open a connection within each individual control, page, or class for
internal usage, or
3. Open a connection each time data needs to be accessed?
If 1 or 2, how do you make sure the connection gets closed? Thanks!