1 / 7

User Input

User Input. This lesson will discuss how to collect information from the user and sending information back to an ASP page for processing. Four general methods of acquiring information from a user are: Text Box, List Box, Check Box and Radio Button. Text Box:. <INPUT Text> Command

arista
Télécharger la présentation

User Input

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User Input This lesson will discuss how to collect information from the user and sending information back to an ASP page for processing. Four general methods of acquiring information from a user are: Text Box, List Box, Check Box and Radio Button.

  2. Text Box: • <INPUT Text> Command • Example: <input type=“text” name=“something” size=5 maxlength=10> • <INPUT Password> command <input type=“password” name=“password”size=5 maxlength=5>

  3. Radio Button: • <Input Radio> Command • <input type=“radio” name=“anything” value=“single” checked>Single • <input type=“radio” name=“anything” value=“married”>Married • In first radio button will be checked automatically.

  4. Check Box: • <Input Checkbox> Command • <input type=“checkbox” name=“anything” value=“1”>ID# • <Input type=“checkbox” name=“anything” value=“2”>SIN#

  5. List Box: • The <Select> Command, it will create drop down list box. • <select name=“option”> <option>Senior Analyst <option selected>Programmer <option>Operator <option>System Manager </selected>

  6. Creating Forms: • First you create Form in order to use Text Box, Radio Button, List Box and Check Box. • So, a Form has two duties: to collect information from the user and to send that information to a separate web page for processing. • <form name=“test” action=“test.asp” method=“post”> • Here, Method=post indicates that we have to use Request.Form in test.asp to access user input data from the Form. You can use method=Get also, but it is not safe as it allows anyone to see valuable information in the URL. When you use Form you should always use Method=Post

  7. Use of Session Objects (discussed in week-4) • How to create Session • How to assign time length • How to end session immediately • Store and retrieve Session variables. • Example Program of using session variable.

More Related