Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Global Connection or variables

Global Connection or variables

Scheduled Pinned Locked Moved ASP.NET
tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tasnim
    wrote on last edited by
    #1

    HI, I WANT TO USE A GLOBAL CONNECTION IN MY ASP PROJECT. I DEFINED A PUBLIC SQLDBCONNECTION IN GLOBAL.ASAX AND WROTE THE CONNECTION IN APPLICATION_START. BUT I AM NOT GETTING THIS CONNECTION OBJECT IN OTHER PAGES. SO PLZ CAN U LET ME KNOW HOW TO DEFINE A GLOBAL CONNECTION AND ACCESS IT FROM OTHER PAGES. THANKS

    M 1 Reply Last reply
    0
    • T Tasnim

      HI, I WANT TO USE A GLOBAL CONNECTION IN MY ASP PROJECT. I DEFINED A PUBLIC SQLDBCONNECTION IN GLOBAL.ASAX AND WROTE THE CONNECTION IN APPLICATION_START. BUT I AM NOT GETTING THIS CONNECTION OBJECT IN OTHER PAGES. SO PLZ CAN U LET ME KNOW HOW TO DEFINE A GLOBAL CONNECTION AND ACCESS IT FROM OTHER PAGES. THANKS

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #2

      Umm... lower case? Anyways, you can't. Every page load is like a clean slate. You have to re-establish the connection for each page. It may be possible to save the connection object in a session variable, but I'm not sure about that. Doesn't feel right to me. Marc Latest AAL Article My blog Join my forum!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups