C
cindy
What is the best way to handle this situation:
You have a very simple phonelist ASP.NET application where users can view
the phone list (dynamic) and they can also update or delete items in the
phone list. So, you would have 3 pages -- one that views the info, one that
updates the info and one that deletes the info.
What would be the best and most efficient place to store the DB connection
object? If each page manually opens the connection, performs the commands
and then closes the connection, it seems like a lot of wasted effort.
Should I make the connection in the main page and then assign it to an
application or session state variable and then use this variable in the 3
pages? Or, is it better to just open and close the connection when needed?
Thanks.
You have a very simple phonelist ASP.NET application where users can view
the phone list (dynamic) and they can also update or delete items in the
phone list. So, you would have 3 pages -- one that views the info, one that
updates the info and one that deletes the info.
What would be the best and most efficient place to store the DB connection
object? If each page manually opens the connection, performs the commands
and then closes the connection, it seems like a lot of wasted effort.
Should I make the connection in the main page and then assign it to an
application or session state variable and then use this variable in the 3
pages? Or, is it better to just open and close the connection when needed?
Thanks.