Home | Advertising Info8 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Monday, May 20, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Classic ASP - Advanced
 PowerASP Code Help Area : Classic ASP - Advanced
Subject Topic: Server Variables Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
cwilliams
Admin Group
Admin Group
Avatar

Joined: April/26/2004
Location: United States
Online Status: Offline
Posts: 137
Posted: April/27/2004 at 8:14pm | IP Logged Quote cwilliams


Server Variables

USAGE:  Request.ServerVariables (variable)


Consult The Microsoft Documentation For A Full Description Of All The Server Variables Below.

Variable

Here are two examples of what you could do with server variables.

HTTP_REFERER server variable can be used as a Dynamic Previous Page Hyperlink.

Paste this code into an asp file and you have an instant (Back Button).
Or add a graphic if you wish.

<a href="<%= Request.ServerVariables("HTTP_REFERER") %>">Previous Page</a>

Previous Page


HTTP_USER_AGENT server variable can determine the client browser type

<%=Request.ServerVariables("HTTP_USER_AGENT")%>

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)

ALL_HTTP
AUTH_TYPE
CONTENT_LENGTH
CONTENT_TYPE
GATEWAY_INTERFACE
HTTP_ACCEPT
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_USER_AGENT
HTTP_COOKIE
HTTP_HOST
HTTP_COOKIE
LOGON_ACCEPT_ENCODING
PATH_INFO
PATH_TRANSLATED
QUERY_STRING
REMOTE_ADDR
REMOTE_IDENT
REMOTE_HOST
REQUEST_METHOD
SCRIPT_MAP
SCRIPT_NAME
SERVER_NAME
SERVER_PORT
SERVER_PORT_SECURE
SERVER_PROTOCOL
SERVER_SOFTWARE
URL

 



__________________


Chris Williams
http://www.PowerASP.com
Back to Top View cwilliams's Profile Search for other posts by cwilliams
 
Bullschmidt
Newbie
Newbie
Avatar

Joined: July/06/2004
Location: United States
Online Status: Offline
Posts: 12
Posted: July/06/2004 at 1:00am | IP Logged Quote Bullschmidt

Here is an example of using a server variable to have a page post back to itself:
<form id="frmMain" name="frmMain" action="<%= Request.ServerVariables("SCRIPT_NAME") %>" method="post">

And to see all the server variables for a Web page try this:
Response.Write "<br>Server:<br>"
For Each varItem in Request.ServerVariables
 For I = 1 to Request.ServerVariables(varItem).Count
  Response.Write varItem & " = " & Request.ServerVariables(varItem)(I) & "<br>"
 Next ' Next I.
Next ' Next varItem.



__________________
J. Paul Schmidt, Freelance ASP Web Developer
www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Sample (Freely Downloadable)
Back to Top View Bullschmidt's Profile Search for other posts by Bullschmidt Visit Bullschmidt's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com