-----Original Message-----
Hi, Another problem I seem to be having with aspx and
FP2K is include pages. I am using the include page webbot
for htm pages which works fine and allows a better
wysiwyg design view. I use <!-- #Include
virtual="IncludePage.htm" --> for the aspx pages. However
when the source is viewed on the published pages, the
aspx pages are including the <html> and <body> tags, so
makes the page very messy. If I remove the <body> etc
tags in the include pages the webbots don't seem to work.
Do I have to use
<!-- #Include virtual="IncludePage.htm" --> for all the
pages?, remove the <body> and <html> tags in the include
pages and do away with webbots altogether? or is there
another way? I want to maintain only one set of pages
that I am including.
As you've probably discovered, the Include Page component
doesn't work properly on .aspx pages. The include shows up
OK in FrontPage, but only the <!--webbot--> tag appears
in the saved version.
Using an <!-- #Include virtual="IncludePage.htm" --> in
both "flat" and .aspx page should work, with two provisos:
o The included "page" must not contain <html>, <head>, or
<body> tags. It can only contain body-type content.
This will preclude editing the content in the FrontPage
WYSIWYG editor, (which adds <html>, <head>, and <body>
if they're "missing").
o You'll need to name your flat pages with filename
extensions of .asp or .stm, or modify your Web server
configuration to invoke SSI processing for .htm pages.
FWIW, in my own work, I don't use either Include Page
components or SSI includes in .aspx pages. Instead, I use
Web User Controls (.ascx files), which have the advantage
of being programmable. Even these, however, have some
quirks:
o They only work in .aspx pages. As a result, I end up
renaming a lot of pages from .htm to .aspx just so
they can display the user control.
o .ascx files are difficult to create in FrontPage.
As a result, I use Visual Studio for that job.
(VB.NET Standard, which costs about the same as
FrontPage, works just as well.)
o FrontPage doesn't automatically fix links in .ascx
files. Therefore, for example, I make each <img> tag
a server control, and add code to correct the path
in its src property. So for this HTML:
<img src="../images/whatever.jpg"
runat="server" id="imgMyPic" />
I would add this code to Page_Load():
imgMyPic.Src = Request.ApplicationPath & _
"/images/" & _
Path.GetFileName(imgMyPic.Src)
BTW, you'll probably encounter a variety of problems using
FP2000 to work with .aspx pages. Snap up a copy of FP2003
as soon as you can find it, and in the meantime find a way
to run FP2002.
Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*