include files

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

    #1

    include files

    Hi all,

    I used to use the include statement in classic asp to centralise my database
    connection, is there a better way in asp.net, whats the norm?.

    Thanks alot


    Neil


  • Kerberoz

    #2
    Re: include files

    neil,

    use web.config to store your db connection string...

    HTH


    "Neil Steventon" <neil.steventon @qualtronyc.co. uk> wrote in message
    news:vgnlt9t0ad 0ub0@corp.super news.com...[color=blue]
    > Hi all,
    >
    > I used to use the include statement in classic asp to centralise my[/color]
    database[color=blue]
    > connection, is there a better way in asp.net, whats the norm?.
    >
    > Thanks alot
    >
    >
    > Neil
    >
    >[/color]


    Comment

    • MN

      #3
      Re: include files

      does asp.net support include files ?

      MN

      "Kerberoz" <dec698@hotmail .com> wrote in message
      news:ucHtMhfRDH A.3192@TK2MSFTN GP10.phx.gbl...[color=blue]
      > neil,
      >
      > use web.config to store your db connection string...
      >
      > HTH
      >
      >
      > "Neil Steventon" <neil.steventon @qualtronyc.co. uk> wrote in message
      > news:vgnlt9t0ad 0ub0@corp.super news.com...[color=green]
      > > Hi all,
      > >
      > > I used to use the include statement in classic asp to centralise my[/color]
      > database[color=green]
      > > connection, is there a better way in asp.net, whats the norm?.
      > >
      > > Thanks alot
      > >
      > >
      > > Neil
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • MN

        #4
        Re: include files

        does asp.net support include files ?

        MN

        "Kerberoz" <dec698@hotmail .com> wrote in message
        news:ucHtMhfRDH A.3192@TK2MSFTN GP10.phx.gbl...[color=blue]
        > neil,
        >
        > use web.config to store your db connection string...
        >
        > HTH
        >
        >
        > "Neil Steventon" <neil.steventon @qualtronyc.co. uk> wrote in message
        > news:vgnlt9t0ad 0ub0@corp.super news.com...[color=green]
        > > Hi all,
        > >
        > > I used to use the include statement in classic asp to centralise my[/color]
        > database[color=green]
        > > connection, is there a better way in asp.net, whats the norm?.
        > >
        > > Thanks alot
        > >
        > >
        > > Neil
        > >
        > >[/color]
        >
        >[/color]




        Comment

        • Kevin Spencer

          #5
          Re: include files

          ASP.Net has support for include files. However, the support is there mostly
          for backwards-compatibility, and you should avoid using server-side
          includes. The problem is that ASP is procedural in nature, and therefore, an
          include file is processed in the position in the page script where it is
          included. ASP.Net, however, is object-oriented, and your code is not
          executed in the order in which it appears in the page. Objects are
          instantiated, and their methods are called, and each object renders itself
          in the page. This means that using an include file is not only NOT
          object-oriented, but the results of including it can be not at all what you
          might expect. Instead, try to stick with using object-oriented principles
          and methods in your coding.

          --
          HTH,

          Kevin Spencer
          ..Net Developer
          Microsoft MVP
          All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

          Big things are made up
          of lots of little things

          "MN" <ngpvivek@yahoo .com> wrote in message
          news:uUVKdvfRDH A.3880@tk2msftn gp13.phx.gbl...[color=blue]
          > does asp.net support include files ?
          >
          > MN
          >
          > "Kerberoz" <dec698@hotmail .com> wrote in message
          > news:ucHtMhfRDH A.3192@TK2MSFTN GP10.phx.gbl...[color=green]
          > > neil,
          > >
          > > use web.config to store your db connection string...
          > >
          > > HTH
          > >
          > >
          > > "Neil Steventon" <neil.steventon @qualtronyc.co. uk> wrote in message
          > > news:vgnlt9t0ad 0ub0@corp.super news.com...[color=darkred]
          > > > Hi all,
          > > >
          > > > I used to use the include statement in classic asp to centralise my[/color]
          > > database[color=darkred]
          > > > connection, is there a better way in asp.net, whats the norm?.
          > > >
          > > > Thanks alot
          > > >
          > > >
          > > > Neil
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >
          >
          >[/color]


          Comment

          • Yangtsi River

            #6
            Re: include files

            u can do it as before in ASP.NET


            "Neil Steventon" <neil.steventon @qualtronyc.co. uk> дÈëÏûÏ¢ÐÂÎÅ
            :vgnlt9t0ad0ub0 @corp.supernews .com...[color=blue]
            > Hi all,
            >
            > I used to use the include statement in classic asp to centralise my[/color]
            database[color=blue]
            > connection, is there a better way in asp.net, whats the norm?.
            >
            > Thanks alot
            >
            >
            > Neil
            >
            >[/color]


            Comment

            Working...