include file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • martin1

    #1

    include file

    Hi, All,

    I used to use include file (filename.inc) in asp to incude common varibles'
    value and DB connection, I tried to use same include file but failed, so
    anyone knows how to use include file in VB 2005 ASP? or has another solution
    on how to use separeate file to include comman varible vaule like session
    varible?

    Thanks,
    Ma
  • Scott M.

    #2
    Re: include file

    Use User Controls. Create a User Control, add whatever code you want,
    compile the project and then open whatever web page(s) you need that code in
    and drag the .ascx file from your solution explorer into the page.


    "martin1" <martin1@discus sions.microsoft .comwrote in message
    news:339C54E9-CAB1-4138-9B9D-81D307FA7A8E@mi crosoft.com...
    Hi, All,
    >
    I used to use include file (filename.inc) in asp to incude common
    varibles'
    value and DB connection, I tried to use same include file but failed, so
    anyone knows how to use include file in VB 2005 ASP? or has another
    solution
    on how to use separeate file to include comman varible vaule like session
    varible?
    >
    Thanks,
    Ma

    Comment

    • Cor Ligthert [MVP]

      #3
      Re: include file

      Martin,

      In slightly other words than Scott wrote but in fact telling the same.

      Make (not shared) classes from that what you want to reuse.
      That can be a user control but as well everything else.

      Cor

      "martin1" <martin1@discus sions.microsoft .comschreef in bericht
      news:339C54E9-CAB1-4138-9B9D-81D307FA7A8E@mi crosoft.com...
      Hi, All,
      >
      I used to use include file (filename.inc) in asp to incude common
      varibles'
      value and DB connection, I tried to use same include file but failed, so
      anyone knows how to use include file in VB 2005 ASP? or has another
      solution
      on how to use separeate file to include comman varible vaule like session
      varible?
      >
      Thanks,
      Ma

      Comment

      Working...