Articles

 
Text Box and Text area:
--------------------------------------------------------------------------------

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%>&nbsp;<%=strFirstName%><p>
<b>Comments: </b> &nbsp;<%=strComments%><br>

 

www.19dev.com