Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2003
    Location
    Hollis, NH
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Application-level ASP.NET objects

    Hi folks! First post here.

    I have an ASP.NET application, and I'd like to make it so that I only have to set the connection object in one place for the entire app. I know classic ASP apps can use Global.asa to set variables like this, but it doesn't seem to work if I create a connection object in Global.asax.

    Does anyone have any suggestions or best practices for this?

    Thanks!

  • #2
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts
    into the web.config

    <appSettings>
    <add key="DataSource" value="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\wwwroot\angiras\DataBase\angiras.mdb" />

    and you call it

    myconn = configurationSettings.Appsettings("DataSource")
    Last edited by angiras; 12-05-2003 at 02:41 PM.

  • #3
    New to the CF scene
    Join Date
    Dec 2003
    Location
    Hollis, NH
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you kindly, angiras.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •