User logon-asp instance

Source: Internet
Author: User
Tags html page
Enter the user name and password
User name:
Password:

Source code:
<HTML>
<BODY>
<TITLE>
User logon
</TITLE>
<%
If Request. Form. Count = 0 then
%>
Enter the user name and password
<Form action = "login. asp" METHOD = "post">
<Table border = 0>
<Tr> <td> user name: </td>
<Td> <input type = text NAME = username VALUE = "1234" size = "20"> </td>
</Tr>
<Tr> <td> Password: </td>
<Td> <input type = password NAME = password VALUE = "1234" size = "20"> </td>
</Tr>
</Table>
<Input type = Submit VALUE = confirm submission>
<Input type = reset VALUE = Re-INPUT>
</FORM>
<% Else %>
<%
Dim user
Dim pwd
User = Request. Form ("username ")
Pwd = Request. Form ("password ")
If user= "1234" then
If pwd = "1234" then
Response. write "user logon successful"
Else
Response. write "invalid user password"
End if
Else
Response. write "invalid user"
End if
End if
%>
The following learning channel browsing page is an html page, so normal asp code effects cannot be demonstrated. The above demonstration is a case after the code is explained through iis. You can test the effect by copying the code.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.