Text box and Textarea
This sample is using two files. One is simple HTML page
to enter data, and second is an ASP Page which get the data entered in the form.
<form method="Post" action="textboxasp.asp">
<table width="400">
<tr>
<td>
<b>1. Your First Name:<br>
</b>
<menu>
<input size="35" name="FirstName" type="text">
</menu>
<b>2. Your Last Name:<br>
</b>
<menu>
<input size="35" name="LastName" type="text">
</menu>
<b>3. Comments<br>
</b></font>
<menu>
<textarea rows="5" cols="35" name="Comments">
This is how it works
</textarea>
</menu>
<p>
<center>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</center>
</td>
</tr>
</table>
</form>
<%
' Dimension loacl variables
Dim strFirstName, strLastName, strComments
' Get the values entered in the form
' and send to server using Post method
strFirstName = Request.Form("FirstName")
strLastName = Request.Form("LastName")
strComments = Request.Form("Comments")
' This is simple text box so there is nothing much to do
' you can either store these calues to database
' or a text file or send back to client what ever you
' have the process for data
' In this example i just simply display then to client
%>
<p>
<b>Name:</b>
<%=strLastName%>
<%=strFirstName%>
<p>
<b>Comments: </b> <%=strComments%><br>
|