home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / pc / software / entwickl / win95 / plsei306.exe / aspSamples / response.asp < prev    next >
Text File  |  1997-03-22  |  1KB  |  42 lines

  1. <%@ LANGUAGE = PerlScript%>
  2. <HTML>
  3. <HEAD><TITLE>Response Object</TITLE></HEAD>
  4. <!-- 
  5.     Copyright (c) 1996, Microsoft Corporation.  All rights reserved.
  6.     Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
  7. -->
  8.  
  9. <BODY> <BODY BGCOLOR=#FFFFFF>
  10. <!-- 
  11.     ActiveWare PerlScript sample 
  12.     PerlScript:  The coolest way to program custom web solutions. 
  13. -->
  14.  
  15. <!-- Masthead -->
  16. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  17. <TR VALIGN=TOP ><TD WIDTH=400>
  18. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveWare PerlScript" BORDER=0></A><P>
  19. </TD></TR></TABLE>
  20.  
  21. <H3>Response Object</H3><P>
  22. There are many ways to get information sent to a browser.<P>
  23. <OL>
  24. <LI> You can use HTML!
  25. <LI> You can use <% ="expressions" %>.
  26. <LI> You can use <% $Response->write("the Response object");%>.
  27. <!-- +++++++++++++++++++++++++++++++++++++
  28. here is the standard showsource link - 
  29.     Note that PerlScript must be the default language --> <hr>
  30. <%
  31.     $url = $Request->ServerVariables('PATH_INFO')->item;
  32.     $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  33.     s/[\/\\](\w*\.asp\Z)//m;
  34.     $params = 'filename='."$1".'&URL='."$url";
  35.     $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  36. %>
  37. <A HREF="index.htm"> Return </A>
  38. <A HREF="showsource.asp?<%=$params%>">
  39. <h4><i>view the source</i></h4></A>  
  40.  
  41. </BODY>
  42. </HTML>