Ask a Question related to ASP.NET General, Design and Development.
-
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
Neil Steventon Guest
-
editing include files
Can you explain in more detail how you got includes to work using Cold Fusion and Contribute. I've found that they don't display correctly in edit... -
how do I hide database connection files using PHP include files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file,... -
Include files in .NET
Hi, Does anyone know the syntax to include a .js file in an ASPX page. Colm -
Include Files Dynamically
Hey there ! I made my own WebControl, that inherits from WebControls, and i added an HtmlTable to it. I would like to include a file,... -
DM MX and Include files
We recently converted from MS Interdev to DW MX and I have copied the files for our existing site into a local site in DW. Most of our pages have SSI... -
Yangtsi River #2
Re: include files
u can do it as before in ASP.NET
"Neil Steventon" <neil.steventon@qualtronyc.co.uk> дÈëÏûÏ¢ÐÂÎÅ
:vgnlt9t0ad0ub0@corp.supernews.com...database> Hi all,
>
> I used to use the include statement in classic asp to centralise my> connection, is there a better way in asp.net, whats the norm?.
>
> Thanks alot
>
>
> Neil
>
>
Yangtsi River Guest
-
Kerberoz #3
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:vgnlt9t0ad0ub0@corp.supernews.com...database> Hi all,
>
> I used to use the include statement in classic asp to centralise my> connection, is there a better way in asp.net, whats the norm?.
>
> Thanks alot
>
>
> Neil
>
>
Kerberoz Guest
-
MN #4
Re: include files
does asp.net support include files ?
MN
"Kerberoz" <dec698@hotmail.com> wrote in message
news:ucHtMhfRDHA.3192@TK2MSFTNGP10.phx.gbl...> neil,
>
> use web.config to store your db connection string...
>
> HTH
>
>
> "Neil Steventon" <neil.steventon@qualtronyc.co.uk> wrote in message
> news:vgnlt9t0ad0ub0@corp.supernews.com...> database> > Hi all,
> >
> > I used to use the include statement in classic asp to centralise my>> > connection, is there a better way in asp.net, whats the norm?.
> >
> > Thanks alot
> >
> >
> > Neil
> >
> >
>
MN Guest
-
MN #5
Re: include files
does asp.net support include files ?
MN
"Kerberoz" <dec698@hotmail.com> wrote in message
news:ucHtMhfRDHA.3192@TK2MSFTNGP10.phx.gbl...> neil,
>
> use web.config to store your db connection string...
>
> HTH
>
>
> "Neil Steventon" <neil.steventon@qualtronyc.co.uk> wrote in message
> news:vgnlt9t0ad0ub0@corp.supernews.com...> database> > Hi all,
> >
> > I used to use the include statement in classic asp to centralise my>> > connection, is there a better way in asp.net, whats the norm?.
> >
> > Thanks alot
> >
> >
> > Neil
> >
> >
>
MN Guest
-
Kevin Spencer #6
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
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"MN" <ngpvivek@yahoo.com> wrote in message
news:uUVKdvfRDHA.3880@tk2msftngp13.phx.gbl...> does asp.net support include files ?
>
> MN
>
> "Kerberoz" <dec698@hotmail.com> wrote in message
> news:ucHtMhfRDHA.3192@TK2MSFTNGP10.phx.gbl...>> > neil,
> >
> > use web.config to store your db connection string...
> >
> > HTH
> >
> >
> > "Neil Steventon" <neil.steventon@qualtronyc.co.uk> wrote in message
> > news:vgnlt9t0ad0ub0@corp.supernews.com...> > database> > > Hi all,
> > >
> > > I used to use the include statement in classic asp to centralise my> >> > > connection, is there a better way in asp.net, whats the norm?.
> > >
> > > Thanks alot
> > >
> > >
> > > Neil
> > >
> > >
> >
>
>
>
Kevin Spencer Guest
-
Steve C. Orr, MCSD #7
Re: Include files
The most common approach is to replace include files with web user controls.
They basically are like object oriented include files on steroids.
Here's more info:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontowebusercontrols.asp[/url]
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp[/url]
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp[/url]
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Michael Tissington" <michael@nospam.com> wrote in message
news:egWp3xaSDHA.1684@TK2MSFTNGP11.phx.gbl...using> I have a web project that has a bunch of include (.inc files)
> In my aspx I have something like
>
> <!-- #include file = ..... ->
>
> In a single aspx I might have a number of these inc and basically I'mdifferent> them to avoid retyping a bunch of common html.
>
> For example I have a header.inc which I put inside the <head> tag and the
> inc file has information about style sheets and javascript files that I
> load.
>
> What is a better way of doing this that does not use inc files.
>
> Basically I have a bunch of common html that I need to include in> apsx files.
>
> Thanks.
>
> --
> Michael Tissington
> Oaklodge Technologies
> [url]http://www.oaklodge.com/technology[/url]
>
>
>
Steve C. Orr, MCSD Guest
-
Michael Tissington #8
Re: Include files
Thanks
--
Michael Tissington
Oaklodge Technologies
[url]http://www.oaklodge.com/technology[/url]
"Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
news:%23NcEf2aSDHA.2252@TK2MSFTNGP12.phx.gbl...controls.> The most common approach is to replace include files with web user[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconintroductiontowebusercontrols.asp[/url]> They basically are like object oriented include files on steroids.
>
> Here's more info:
>[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp[/url]>[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp[/url]>the>
> --
> I hope this helps,
> Steve C. Orr, MCSD
> [url]http://Steve.Orr.net[/url]
>
>
> "Michael Tissington" <michael@nospam.com> wrote in message
> news:egWp3xaSDHA.1684@TK2MSFTNGP11.phx.gbl...> using> > I have a web project that has a bunch of include (.inc files)
> > In my aspx I have something like
> >
> > <!-- #include file = ..... ->
> >
> > In a single aspx I might have a number of these inc and basically I'm> > them to avoid retyping a bunch of common html.
> >
> > For example I have a header.inc which I put inside the <head> tag and> different> > inc file has information about style sheets and javascript files that I
> > load.
> >
> > What is a better way of doing this that does not use inc files.
> >
> > Basically I have a bunch of common html that I need to include in>> > apsx files.
> >
> > Thanks.
> >
> > --
> > Michael Tissington
> > Oaklodge Technologies
> > [url]http://www.oaklodge.com/technology[/url]
> >
> >
> >
>
Michael Tissington Guest
-
Mike Clay #9
Re: Include files
Hi Michael,
Here is another article that might help also:
[url]http://www.xefteri.com/articles/23dec2002/[/url]
Mike Clay, MCSD
ASP.Net Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.
Mike Clay Guest



Reply With Quote

