Skip Navigation Links.
Simple Guestbook

A simple guestbook to demonstrate using the Scripting.FileSystemObject.

<% Option Explicit %> 

 'FileScriptingObject Constants 
 Const ForAppending = 8
 Const ForReading = 1
 Const ForWriting = 2

  Simple Guest Book
  Jon Vote, Idioma Software Inc. 

  This program shows how to use the FileSystemObject to 
  append an HTML file from information on a Form.
  !! Note !! You must have write permissions on your 
  server to create and append to files. 
  Contact your ISP for further information. 


<META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Simple Guestbook</TITLE>

<Center><H3>Using the FileSystemObject - a Simple Guestbook</H3></Center>
This ASP Example was provided by <A Href="">Idioma Software Inc.</A><BR><BR>

 'If the Submit button has not been pressed, 
 'display the form. 
 If Request.Form("AddInformation") = "" Then 
 Else 'Submit button was pushed here. 
   'Add the entry only if all fields 
   'have been entered
   If Request.Form("Name") <> "" _ 
     And Request.Form("Comments") <> "" Then 
     'Missing field here, show form again. 
   End If 
 End If 


<% 'ShowForm - Display the form here 
Private Sub ShowForm 
<Center><H3>Please enter all of the following information</H3></Center>
<FORM Method=Post>
 <Table Align=Center> 
   <TD>Name:</TD><TD><Input Type=Text Name=Name Size=45 Value="<%=Request.Form("Name")%>"></TD>
   <TD>Comments:</TD><TD><TextArea Name=Comments Cols=40 Rows=5><%=Request.Form("Comments")%>
From: Amitava - 2014-08-10

This article has been viewed 9218 times.
The examples on this page are presented "as is". They may be used in code as long as credit is given to the original author. Contents of this page may not be reproduced or published in any other manner what so ever without written permission from Idioma Software Inc.