G
Guest
I have 3 User Control .ascx files that are included in a base .aspx file.
In each ascx file, as well as the base aspx file, I make ADO.Net calls that
require a datatbase connection.
It appears that I have to open and close the connection in each file (i.e. I
can not reuse the open connection between all 4 pages)? This means that I
must open and close the connection 4 times when servering one page (base aspx
and 3 ascx files).
Is there any way that I can accomplish this without so opening and closing
the connection so many times?
Wouldn't this become a scalability problem if I continually have to open and
close connections multiple times on each page?
I have thought about using a session variable for the connection, but I have
read the MS does not recommend using a session variable for the connection?
TIA
In each ascx file, as well as the base aspx file, I make ADO.Net calls that
require a datatbase connection.
It appears that I have to open and close the connection in each file (i.e. I
can not reuse the open connection between all 4 pages)? This means that I
must open and close the connection 4 times when servering one page (base aspx
and 3 ascx files).
Is there any way that I can accomplish this without so opening and closing
the connection so many times?
Wouldn't this become a scalability problem if I continually have to open and
close connections multiple times on each page?
I have thought about using a session variable for the connection, but I have
read the MS does not recommend using a session variable for the connection?
TIA