www.fingertip.page.tl or www.fingertip.us.tt - ASP-2
   
www.fingertip.us.tt
  Index
  Free WebHost&DNS
  Hardware&Networking
  Red Hat Enterprise Linux 5
  Active Server Page2.0
  => Active Server Pages2.0
  => ASP-1
  => ASP-1.1
  => ASP-2
  => ASP-3
  => ASP-4
  => ASP-5
  Database Coding Standards
  .Net Platform
  Link Website
  Online Game
  Satellite Image Home
  Download Toolbar
  Other
  WebMaster
  Counter
  SiteMap
  Guestbook
  To Contact Us
  IT People
  Website Grade
  Learn English
  Donate Money
  Comrades
  Free Dictionary
  VaaHOO

www.e-comwebsite.blogspot.com
Search for
 
A form with checkboxes
<html>
<body>
<%
fruits=Request.Form("fruits")
%>


<form action="demo_checkboxes.asp" method="post">
<p>Which of these fruits do you prefer:</p>
<input type="checkbox" name="fruits" value="Apples"
<%if instr(fruits,"Apple") then Response.Write("checked")%>>
Apple
<br>
<input type="checkbox" name="fruits" value="Oranges"
<%if instr(fruits,"Oranges") then Response.Write("checked")%>>
Orange
<br>
<input type="checkbox" name="fruits" value="Bananas"
<%if instr(fruits,"Banana") then Response.Write("checked")%>>
Banana
<br>
<input type="submit" value="Submit">
</form>
<%
if fruits<>"" then%>

   <p>You like: <%Response.Write(fruits)%></p>
<%end if
%>


</body>
</html>
<html>
<body>
<p>
<b>You are browsing this site with:</b>
<%Response.Write(Request.ServerVariables("http_user_agent"))%>
</p>
<p>
<b>Your IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_addr"))%>
</p>
<p>
<b>The DNS lookup of the IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_host"))%>
</p>
<p>
<b>The method used to call the page:</b>
<%Response.Write(Request.ServerVariables("request_method"))%>
</p>
<p>
<b>The server's domain name:</b>
<%Response.Write(Request.ServerVariables("server_name"))%>
</p>
<p>
<b>The server's port:</b>
<%Response.Write(Request.ServerVariables("server_port"))%>
</p>
<p>
<b>The server's software:</b>
<%Response.Write(Request.ServerVariables("server_software"))%>
</p>

</body>
</html>



List all servervariables you can ask for
<html>
<body>

<p>
All possible server variables:
</p>
<%
For Each Item in Request.ServerVariables
      Response.Write(Item & "<br />")
Next
%>


</body>
</html>



<%
dim numvisits
response.cookies("NumVisits").Expires=date+365
numvisits=request.cookies("NumVisits")
%>

<html>
<body>
<%
if numvisits="" then
   response.cookies("NumVisits")=1%>

   Welcome! This is the first time you are visiting this Web page.
<%
else
   response.cookies("NumVisits")=numvisits+1
   response.write("You have visited this ")
   response.write("Web page " & numvisits)
   if numvisits=1 then
     response.write " time before!"
   else
     response.write " times before!"
   end if
end if
%>

</body>
</html>
<html>
<body>

<form action="demo_totalbytes.asp" method="post">
Please type something:
<input type="text" name="txt"><br><br>
<input type="submit" value="Submit">
</form>

<%
If Request.Form("txt")<>"" Then
   Response.Write("You submitted: ")
   Response.Write(Request.Form)
   Response.Write("<br><br>")
   Response.Write("Total bytes: ")
   Response.Write(Request.Totalbytes)
End If
%>


</body>
</html>
 
 
<html>
<body>

<%
Response.Write(Session.SessionID)
%>


</body>
</html>
 
<html>
<body>

<% 
response.write("<p>")
response.write("Default Timeout is: " & Session.Timeout & " minutes.")
response.write("</p>")

Session.Timeout=30

response.write("<p>")
response.write("Timeout is now: " & Session.Timeout & " minutes.")
response.write("</p>")
%>


</body>
</html>
 
 
 
 
 
Server Object
<html>
<body>

<%
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set rs = fs.GetFile(Server.MapPath("demo_lastmodified.asp"))
modified = rs.DateLastModified
%>

This file was last modified on:
<%response.write(modified)
Set rs = Nothing
Set fs = Nothing
%>


</body>
</html>




Open a textfile for reading
<html>
<body>

<%
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("text") & "TextFile.txt",1)
While not rs.AtEndOfStream
      Response.Write RS.ReadLine
      Response.Write("<br />")
Wend
%>


<p>
<a href="text/textfile.txt"><img border="0" src="../images/btn_view_text.gif"></a>
</p>

</body>
</html>









Home made hit counter
<%
Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 1, False)
fcount=RS.ReadLine
RS.Close

fcount=fcount+1

'This code is disabled due to the write access security on our server:
'Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 2, False)
'RS.Write fcount
'RS.Close

Set RS=Nothing
Set FS=Nothing

%>

<html>
<body>
<p>
This page has been visited <%=fcount%>  times.
</p>
</body>
</html>
 
 
FileSystem Object
<html>
<body>

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If (fs.FileExists("c:winntcursors3dgarro.cur"))=true Then
      Response.Write("File c:winntcursors3dgarro.cur exists.")
Else
      Response.Write("File c:winntcursors3dgarro.cur does not exist.")
End If

set fs=nothing
%>


</body>
</html>
<html>
<body>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If fs.FolderExists("c:temp") = true Then
      Response.Write("Folder c:temp exists.")
Else
      Response.Write("Folder c:temp does not exist.")
End If

set fs=nothing
%>


</body>
</html>
<html>
<body>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

if fs.driveexists("c:") = true then
      Response.Write("Drive c: exists.")
Else
      Response.Write("Drive c: does not exist.")
End If

Response.write("<br>")

if fs.driveexists("g:") = true then
      Response.Write("Drive g: exists.")
Else
      Response.Write("Drive g: does not exist.")
End If

set fs=nothing
%>


</body>
</html>

Locations of visitors to this page




Comments on this page:
Comment posted by esoldHtf( 34tghfhigmail.com ), 06/13/2021 at 5:09am (UTC):
cialis 5mg daily price <a href=https://cialishav.com/>buy cialis in canada</a> cialis india

Comment posted by esoldHtf( 34tghfhigmail.com ), 06/04/2021 at 4:11pm (UTC):
cialis cheap free shipping <a href=https://cialishav.com/>cialis blindness</a> cialis coupon lilly

Comment posted by esoldAni( 3gh56pcvhigmail.com ), 06/03/2021 at 4:38am (UTC):
Lioresal <a href=https://pharmacyken.com/>rx care pharmacy detroit mi</a> hydrocodone online pharmacy

Comment posted by jeoffAsd( wdtna4pvsderv3higmail.com ), 06/01/2021 at 7:44pm (UTC):
cialis\ <a href=https://cialisjla.com/>generic cialis no prescription</a> us online cialis

Comment posted by esoldGtv( svzcher3prghigmail.com ), 05/29/2021 at 12:38am (UTC):
pharmacy drugs online <a href=https://pharmacyhrn.com/>costco online pharmacy</a> jamaica rx pharmacy



Add comment to this page:
Your Name:
Your Email address:
Your website URL:
Your message:

   
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free