The Front Page Wizard

 Home | ASP Tips | DHTML Tips | JavaScript Tips | Alt Keys | Contact The Wizard

Home
FrontPage Addin Jbots
FrontPage Templates
FrontPage Help
FrontPage Books
Javascript Tips & Tricks
ASP Tips and Tricks
DHTML Span Styles
Use Alt Keys
FP Database Tips Tricks
Meta Tag Tips
Meta Tag Generator
Search Engine Basics
Promoting Your Site
FrontPage Tips and Tricks
Privacy Policy

 

 

 

          

 

 

ASP Tips and Tricks

 

This is a J-Bots Component!

 

 

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:
Wednesday, May 14, 2008
And here is the time:
18:07

 

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:

 

bullet

Your IP address is: 38.103.63.16

 

bulletThe browser your using is:

 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:

 

bullet

ASP101 - The place ASP developers GO!  - One Of The Wizard's Favorite's. Great examples resources tips basically anything ASP related.

 

bullet

ASP Resource Index - A directory of ASP tutorials, applications, scripts, components and articles for the novice to professional developer.

 

bullet

4 Guys From Rolla - 4GuysFromRolla: Web Technology, Programming, Humor... All this and it counts as work!

 

bullet

Cover Your ASP - So much ASP they are really great!

 

bullet

ASP Wire - ASPWire, the ASP Newswire, is your ultimate source of Active Server Pages news.

 

bullet

15 Seconds - Free resource for developers working with Microsoft Internet Solutions. 15 Seconds is the biggest IIS and ASP development resource in the world.

 

bullet

ASP FREE - Your 1st source for free ASP and ASP.NET live demos, downloads and more!!!

 

 

 

 

 

 

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007   FrontPageWizard.com    All Rights Reserved

Microsoft® and FrontPage® are registered trademarks of Microsoft Corporation.
Microsoft Corporation is in no way affiliated with nor dose it endorse FrontPageWizard.com

FrontPage Help Center By: Karey Cummins of Round The Bend Wizards  •  

Curser by: Lisa's Curser  •  Meta Tag Generator by: SearchBliss   •  RGB Color Calculator by: Greg Reimer