the best thing to do is to put it in your web.config. It can then be accessed via ConfigurationSettings.AppSettings("connectionStrin g"). Even better would be to build a wrapper utility for this:
Public NotInheritable Class DatabaseUtility
Private Sub New()
End Sub
Public Shared ReadOnly Property ConnectionString() As String
Get
Return ConfigurationSettings.AppSettings("connectionStrin g")
End Get
End Property
End Class
it can then be accessed via DatabaseUtility.ConnectionString
Session is a bad place for it..since htere'a session by user, but this is a global thing.
--
MY ASP.Net tutorials
http://www.openmymind.net/
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:OU***************@TK2MSFTNGP11.phx.gbl...
I need to have a string available per page, i.e. the SQL Connection String. What's the best way of doing this? Right now I have it loaded into a session variable, but I think I should do something with global.asax??
Thanks!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com