FrontPage 2002: View ASP Pages without Disturbing the Code

Active Server Page Source Code Preservation allows users to
edit content in pages containing ASP code without disturbing the ASP code
itself. New in Microsoft FrontPage® version 2002, ASP Source Code
Preservation will always open the ASP page in the Normal View, regardless
of whether the ASP code violates convention
(such as multiple <
Head
>, or
<
Body
> tags).
Tip: If you have an .asp page on your computer, you can open the
page from File, Open, location or URL and view it in
Normal View for editing.
New - Time and Date Tip
Here's a easy way to add in the time or date to your page.
Copy the script below into a blank notepad
page and save it as a text file. Then recopy into your code from it. Make
sure this code is in the <
Body
> section and its on a .asp page....
:-)
<%
response.write("Here is the date: ")
response.write("<br />")
response.write(FormatDateTime(date(),vblongdate))
response.write("<br />")
response.write(" And here is the time: ")
response.write("<br />")
response.write(FormatDateTime(now(),vbshorttime))
%>
Above Example:
Here is the date:
Monday, September 08, 2008
And here is the time:
08:12

Display your visitors IP address:
Copy the script below into a blank notepad
page and save it as a text file. Then recopy into your code from it. Make
sure this code is in the <
Body
> section and its on a .asp page....
:-)
To display the visitors IP address or your
visitors user agent information, use
Request.ServerVariables. This goes in the
<
Body
> area of your code. You can request lots of different
variables, this way.
<%Response.Write(Request.ServerVariables("remote_addr"))%>
<%Response.Write(Request.ServerVariables("http_user_agent"))%>
Here are the examples:
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
Sort of Cool Huh... Ok One More
Check out the use of
Request.ServerVariables("SERVER_NAME")
Copy the script below into a blank notepad
page and save it as a text file. Then recopy it to your clip board. Place
your curser on the page in the normal view where you want the results or out put
to show up and then switch to html view. Now paste your code in where the curser
is blinking. Save the page publish it and check it out. Oh yea here's here's a
couple silly last few tips (believe it or not I've done this so, hehe, learn
from me) - Make
sure this code is in the <
Body
> section and its on a .asp page....
:-)
<A HREF= "http://<%=Request.ServerVariables("SERVER_NAME")%>/default.asp">
Link to Home Page
</A>
See The Example:
Link to Home Page
In the example we use default.asp of course if were
only going to the home page that's not needed but you could change default.asp
to be any file below the root like contact.asp or links.asp or what ever.

Check out more tips at the following
Wizard Recommended Sites: