' /templates/normal.asp <-- IN SAME DIR AS INDEX.ASP TITLE <-- IN SAME DIR AS INDEX.ASP I can't seem to include relative to the parent file when using nested includes in ASP like I can when using PHP. I'd really like to be wrong or maybe have a misconfigured server, but the documentation I've read states that 'include file' includes the file that is located in the same directory as the file with the include statement. This isn't a slam on ASP or a PHP vs ASP attempt... I actually prefer ASP. I just saw something I liked in PHP that I wasn't able to duplicate in ASP on IIS 4.0. There are workarounds, but the only one that will allow me to use ASP code in the innermost included file is server.execute which isn't available until 5.0 (we might move to IIS 6.0 but my Win2k3 trial server is currently offline so I haven't tested). -- Mike [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Mike [ip] => sorry@sorry.com [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > >' /templates/normal.asp > <-- IN SAME DIR AS INDEX.ASP > >TITLE > > <-- IN SAME DIR AS INDEX.ASP > > > >I can't seem to include relative to the parent file when using nested >includes in ASP like I can when using PHP. I'd really like to be wrong or >maybe have a misconfigured server, but the documentation I've read states >that 'include file' includes the file that is located in the same directory >as the file with the include statement.[/quote] What doesn't work? And what do you see? Do you have URLScan running and possibly blocking the path? Have you tried just #include file = "myfile.asp" as the format (no path designator with the dot and backslash)? Jeff [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <3f33e677.8813803@news.easynews.com> [ref] => [htmlstate] => on_nl2br [postusername] => Jeff Cochran [ip] => jcochran.nospam [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > > > >' /templates/normal.asp > > <-- IN SAME DIR AS INDEX.ASP > > > >TITLE > > > > <-- IN SAME DIR AS INDEX.ASP > > > > > >[/quote] > What doesn't work? And what do you see? Do you have URLScan running > and possibly blocking the path? Have you tried just #include file = > "myfile.asp" as the format (no path designator with the dot and > backslash)?[/quote] Active Server Pages error 'ASP 0126' Include file not found /templates/normal.asp, line 3 The include file './data.asp' was not found. Active Server Pages error 'ASP 0126' Include file not found /templates/normal.asp, line 3 The include file 'data.asp' was not found. I don't use URLScan on this server. I can also use the browser to load up data.asp. In addition, the whole thing works if I stick data.asp in the directory of the 2nd tier include file (normal.asp). This makes me think it's including relative to the 2nd tier include file and not the overall parent file. Thanks for the tips though. -- Mike [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <3f33e677.8813803@news.easynews.com> [htmlstate] => on_nl2br [postusername] => Mike [ip] => sorry@sorry.com [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> note that there is no preceding slash (/) as it "knows" that it's relative to the root. "Mike" wrote in message news:bh0pps$bii$1@geraldo.cc.utexas.edu...[quote] > > "Jeff Cochran" wrote in message > news:3f33e677.8813803@news.easynews.com...[quote][quote] > > >The ASP code below doesn't work... > > > > > >' some index.asp buried several levels down > > > > > > > > >' /templates/normal.asp > > > <-- IN SAME DIR AS INDEX.ASP > > > > > >TITLE > > > > > > <-- IN SAME DIR AS INDEX.ASP > > > > > > > > >[/quote] > > What doesn't work? And what do you see? Do you have URLScan running > > and possibly blocking the path? Have you tried just #include file = > > "myfile.asp" as the format (no path designator with the dot and > > backslash)?[/quote] > > Active Server Pages error 'ASP 0126' > Include file not found > /templates/normal.asp, line 3 > The include file './data.asp' was not found. > > Active Server Pages error 'ASP 0126' > Include file not found > /templates/normal.asp, line 3 > The include file 'data.asp' was not found. > > I don't use URLScan on this server. I can also use the browser to load up > data.asp. In addition, the whole thing works if I stick data.asp in the > directory of the 2nd tier include file (normal.asp). This makes me think > it's including relative to the 2nd tier include file and not the overall > parent file. > > Thanks for the tips though. > > -- > Mike > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <#4lYA5dXDHA.212@TK2MSFTNGP12.phx.gbl> [ref] => <3f33e677.8813803@news.easynews.com> [htmlstate] => on_nl2br [postusername] => Tom B [ip] => shuckle@hotmail [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> at the top of the page. Another example, the authentication and database include files are included by nearly every file. This program uses frames to acheive a consistent navigation interface. The top frame is a thin vertical bar of buttons, and the bottom frame is the content frame. The top frame is always visibile. To maintain a consistent style, every file includes a reference to a common style sheet. I think this program could be even better organized, but the current system seems to work well. If you were not using frames, you could place the navigation-related html code in an include file. Note that #include includes a file *before* the ASP code is executed. Good luck, Shailesh Mike wrote:[quote] > I've been thinking about different ways to manage my site using ASP. We've > got a site redesign on the way and I'm just curious as to how others achieve > modular design. > > We'll have several hundred pages and I want each to have a similar layout... > common nav options on top, constituent nav options on the left side, > standard header, content to the right below the header and nav bar, etc. > > I want to achieve this by having individual directories for each page on the > site. Each directory would have an index that includes a template relative > to the site's root. That template would then include files relative to the > original index to give the page content. Works in PHP, not in ASP, thus I > can't go that route. > > I currently have directories for each page (with some exceptions here and > there) that have index files that build the overall page and include things > like a standardized header (relative to root), standardized footer (relative > to root), content (relative to index), left nav bar (relative to index in > parent directory), etc.. This works, but limits me if I want to change > something on every page (thus I have to change hundreds of index files). > > Anyone have another solution? I'd love to hear it. > > Thanks! > > -- > Mike > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Shailesh Humbad [ip] => humbads1@hotmai [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 6 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Modular design using ASP - ASP

Modular design using ASP - ASP

Mike, I don't follow this exactly. In your third paragraph, what is a concrete example of what you can do with PHP but not ASP? Paul "Mike" <sorrysorry.com> wrote in message news:bh0h08$79s$1geraldo.cc.utexas.edu... > I've been thinking about different ways to manage my site using ASP. We've > got a site redesign on the way and I'm just curious as to how others achieve > modular design. > > We'll have several hundred pages and I want each to have a similar layout... > common nav options on top, constituent nav options on the left side, > standard header, content to ...

  1. #1

    Default Re: Modular design using ASP

    Mike,

    I don't follow this exactly. In your third paragraph, what is a concrete
    example of what you can do with PHP but not ASP?

    Paul

    "Mike" <sorrysorry.com> wrote in message
    news:bh0h08$79s$1geraldo.cc.utexas.edu...
    > I've been thinking about different ways to manage my site using ASP.
    We've
    > got a site redesign on the way and I'm just curious as to how others
    achieve
    > modular design.
    >
    > We'll have several hundred pages and I want each to have a similar
    layout...
    > common nav options on top, constituent nav options on the left side,
    > standard header, content to the right below the header and nav bar, etc.
    >
    > I want to achieve this by having individual directories for each page on
    the
    > site. Each directory would have an index that includes a template
    relative
    > to the site's root. That template would then include files relative to
    the
    > original index to give the page content. Works in PHP, not in ASP, thus I
    > can't go that route.
    >
    > I currently have directories for each page (with some exceptions here and
    > there) that have index files that build the overall page and include
    things
    > like a standardized header (relative to root), standardized footer
    (relative
    > to root), content (relative to index), left nav bar (relative to index in
    > parent directory), etc.. This works, but limits me if I want to change
    > something on every page (thus I have to change hundreds of index files).
    >
    > Anyone have another solution? I'd love to hear it.
    >
    > Thanks!
    >
    > --
    > Mike
    >
    >

    Paul Baker Guest

  2. #2

    Default Re: Modular design using ASP


    "Paul Baker" <ask> wrote in message
    news:Oic0mpcXDHA.1280tk2msftngp13.phx.gbl...
    > Mike,
    >
    > I don't follow this exactly. In your third paragraph, what is a concrete
    > example of what you can do with PHP but not ASP?
    The PHP code below works...

    ' some index.php buried several levels down
    <?php
    include( $_SERVER["DOENT_ROOT"] . "/templates/_main.php" );
    ?>

    ' /templates/_main.php
    <?php
    include( "_data.php" ); <--- IN SAME DIR AS INDEX.PHP
    ?>
    <html>
    <head><title>TITLE</title></head>
    <body>
    include( "_content.php" ); <--- IN SAME DIR AS INDEX.PHP
    ?>
    </body>
    </html>

    The ASP code below doesn't work...

    ' some index.asp buried several levels down
    <!--#include virtual="/templates/normal.asp"-->

    ' /templates/normal.asp
    <!--#include file="./data.asp"--> <-- IN SAME DIR AS INDEX.ASP
    <html>
    <head><title>TITLE</title></head>
    <body>
    <!--#include file="./content.asp"--> <-- IN SAME DIR AS INDEX.ASP
    </body>
    </html>

    I can't seem to include relative to the parent file when using nested
    includes in ASP like I can when using PHP. I'd really like to be wrong or
    maybe have a misconfigured server, but the doentation I've read states
    that 'include file' includes the file that is located in the same directory
    as the file with the include statement.

    This isn't a slam on ASP or a PHP vs ASP attempt... I actually prefer ASP.
    I just saw something I liked in PHP that I wasn't able to duplicate in ASP
    on IIS 4.0.

    There are workarounds, but the only one that will allow me to use ASP code
    in the innermost included file is server.execute which isn't available until
    5.0 (we might move to IIS 6.0 but my Win2k3 trial server is currently
    offline so I haven't tested).

    --
    Mike


    Mike Guest

  3. #3

    Default Re: Modular design using ASP

    >The ASP code below doesn't work...
    >
    >' some index.asp buried several levels down
    ><!--#include virtual="/templates/normal.asp"-->
    >
    >' /templates/normal.asp
    ><!--#include file="./data.asp"--> <-- IN SAME DIR AS INDEX.ASP
    ><html>
    ><head><title>TITLE</title></head>
    ><body>
    ><!--#include file="./content.asp"--> <-- IN SAME DIR AS INDEX.ASP
    ></body>
    ></html>
    >
    >I can't seem to include relative to the parent file when using nested
    >includes in ASP like I can when using PHP. I'd really like to be wrong or
    >maybe have a misconfigured server, but the doentation I've read states
    >that 'include file' includes the file that is located in the same directory
    >as the file with the include statement.
    What doesn't work? And what do you see? Do you have URLScan running
    and possibly blocking the path? Have you tried just #include file =
    "myfile.asp" as the format (no path designator with the dot and
    backslash)?

    Jeff
    Jeff Cochran Guest

  4. #4

    Default Re: Modular design using ASP


    "Jeff Cochran" <jcochran.nospamnaplesgov.com> wrote in message
    news:3f33e677.8813803news.easynews.com...
    > >The ASP code below doesn't work...
    > >
    > >' some index.asp buried several levels down
    > ><!--#include virtual="/templates/normal.asp"-->
    > >
    > >' /templates/normal.asp
    > ><!--#include file="./data.asp"--> <-- IN SAME DIR AS INDEX.ASP
    > ><html>
    > ><head><title>TITLE</title></head>
    > ><body>
    > ><!--#include file="./content.asp"--> <-- IN SAME DIR AS INDEX.ASP
    > ></body>
    > ></html>
    > >
    > What doesn't work? And what do you see? Do you have URLScan running
    > and possibly blocking the path? Have you tried just #include file =
    > "myfile.asp" as the format (no path designator with the dot and
    > backslash)?
    Active Server Pages error 'ASP 0126'
    Include file not found
    /templates/normal.asp, line 3
    The include file './data.asp' was not found.

    Active Server Pages error 'ASP 0126'
    Include file not found
    /templates/normal.asp, line 3
    The include file 'data.asp' was not found.

    I don't use URLScan on this server. I can also use the browser to load up
    data.asp. In addition, the whole thing works if I stick data.asp in the
    directory of the 2nd tier include file (normal.asp). This makes me think
    it's including relative to the 2nd tier include file and not the overall
    parent file.

    Thanks for the tips though.

    --
    Mike


    Mike Guest

  5. #5

    Default Re: Modular design using ASP

    if you use #include file then it looks relative to the file calling it. if
    you use #include virtual then it goes from the root.

    <!--#Include virtual="templates/normal.asp"-->

    note that there is no preceding slash (/) as it "knows" that it's relative
    to the root.


    "Mike" <sorrysorry.com> wrote in message
    news:bh0pps$bii$1geraldo.cc.utexas.edu...
    >
    > "Jeff Cochran" <jcochran.nospamnaplesgov.com> wrote in message
    > news:3f33e677.8813803news.easynews.com...
    > > >The ASP code below doesn't work...
    > > >
    > > >' some index.asp buried several levels down
    > > ><!--#include virtual="/templates/normal.asp"-->
    > > >
    > > >' /templates/normal.asp
    > > ><!--#include file="./data.asp"--> <-- IN SAME DIR AS INDEX.ASP
    > > ><html>
    > > ><head><title>TITLE</title></head>
    > > ><body>
    > > ><!--#include file="./content.asp"--> <-- IN SAME DIR AS INDEX.ASP
    > > ></body>
    > > ></html>
    > > >
    > > What doesn't work? And what do you see? Do you have URLScan running
    > > and possibly blocking the path? Have you tried just #include file =
    > > "myfile.asp" as the format (no path designator with the dot and
    > > backslash)?
    >
    > Active Server Pages error 'ASP 0126'
    > Include file not found
    > /templates/normal.asp, line 3
    > The include file './data.asp' was not found.
    >
    > Active Server Pages error 'ASP 0126'
    > Include file not found
    > /templates/normal.asp, line 3
    > The include file 'data.asp' was not found.
    >
    > I don't use URLScan on this server. I can also use the browser to load up
    > data.asp. In addition, the whole thing works if I stick data.asp in the
    > directory of the 2nd tier include file (normal.asp). This makes me think
    > it's including relative to the 2nd tier include file and not the overall
    > parent file.
    >
    > Thanks for the tips though.
    >
    > --
    > Mike
    >
    >

    Tom B Guest

  6. #6

    Default Re: Modular design using ASP

    One site I've been working on has over 200 modules, and needs to be
    updated frequently and installed on multiple machines. It used to have
    files in different directories, but I removed all the directories
    (except a few for development-related files). Now, to get a list of the
    updated files for the day, I just sort the directory by file time, and
    copy that day's updated files to an 'updates-YYYY-MM-DD' directory.
    This update can be easily copy-pasted onto the other machines.

    Having all the ASP files in one directory also eliminates all file
    referencing problems related to directories, e.g. broken links when
    moving a file from one directory to another, or renaming a directory, or
    putting a file in a sub-directory. When one can assume that all the
    files are in the same directory, one eliminates a *lot* of mostly
    unnecessary work (in this case).

    To keep the files organized, they are named similarly depending on their
    major function. The major groups are list*.asp, change*.asp,
    include.*.asp, system.*.asp, *report.asp, etc.

    Functions that occur in many pages, are placed in the include files, and
    sometimes placed in a class within the include file. For example,
    include.doents.class.asp for dealing with doents. Any
    doent-related file that needs these functions includes it like:

    <!--#include file="include.doents.class.asp"-->

    at the top of the page. Another example, the authentication and
    database include files are included by nearly every file.

    This program uses frames to acheive a consistent navigation interface.
    The top frame is a thin vertical bar of buttons, and the bottom frame is
    the content frame. The top frame is always visibile. To maintain a
    consistent style, every file includes a reference to a common style sheet.

    I think this program could be even better organized, but the current
    system seems to work well. If you were not using frames, you could
    place the navigation-related html code in an include file. Note that
    #include includes a file *before* the ASP code is executed.

    Good luck,
    Shailesh

    Mike wrote:
    > I've been thinking about different ways to manage my site using ASP. We've
    > got a site redesign on the way and I'm just curious as to how others achieve
    > modular design.
    >
    > We'll have several hundred pages and I want each to have a similar layout...
    > common nav options on top, constituent nav options on the left side,
    > standard header, content to the right below the header and nav bar, etc.
    >
    > I want to achieve this by having individual directories for each page on the
    > site. Each directory would have an index that includes a template relative
    > to the site's root. That template would then include files relative to the
    > original index to give the page content. Works in PHP, not in ASP, thus I
    > can't go that route.
    >
    > I currently have directories for each page (with some exceptions here and
    > there) that have index files that build the overall page and include things
    > like a standardized header (relative to root), standardized footer (relative
    > to root), content (relative to index), left nav bar (relative to index in
    > parent directory), etc.. This works, but limits me if I want to change
    > something on every page (thus I have to change hundreds of index files).
    >
    > Anyone have another solution? I'd love to hear it.
    >
    > Thanks!
    >
    > --
    > Mike
    >
    >
    Shailesh Humbad Guest

Similar Threads

  1. CGI scripts and modular design?
    By psyshrike in forum PERL Modules
    Replies: 8
    Last Post: September 29th, 03:20 PM
  2. Modular Text into Projector
    By Toolman21 webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 2
    Last Post: December 12th, 10:14 PM
  3. Modular Photoshop?
    By Leen Koper in forum Adobe Photoshop Elements
    Replies: 4
    Last Post: September 23rd, 11:58 PM
  4. Replies: 5
    Last Post: August 12th, 11:48 AM
  5. Ideas for a modular config file?
    By Andy Smith in forum UNIX Programming
    Replies: 2
    Last Post: July 5th, 05:46 AM

Bookmarks

Posting Permissions

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