当前位置:网站首页>Aspx simple user login
Aspx simple user login
2022-07-05 13:37:00 【Bailu-】
1. Login screen
<%@ Page Language="C#" CodeFile="c.aspx.cs" Inherits="cs.c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title> Untitled Page </title>
</head>
<body>
<form id="form1" runat="server" action="b.aspx" method="post">
Account :<asp:TextBox ID="userid" runat="server"></asp:TextBox><br />
password :<asp:TextBox ID="userpwd" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" Text=" Sign in " />
</form>
</body>
</html>
cs file :
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.OleDb;
namespace cs
{
public partial class c : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Here is a simple prompt for users , Prompt the user that the user name or password may be entered incorrectly
String verify = Request.QueryString["verify"];
Boolean vf=Convert.ToBoolean(verify);
if (!vf)
{
Response.Write("<script>alert(' The account or password you entered is incorrect , Please re-enter !!!!')</script>");
}
}
}
}
2. Verification interface cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
namespace cs
{
public partial class b : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String userid = Request.Form["userid"];
String userpwd = Request.Form["userpwd"];
// extract post data , Then judge whether the password and account are correct , If not , Then return to the login interface
if (userpwd != "abc" || userid !="123")
{
Response.Redirect("c.aspx?verify=false");
}
}
}
}
边栏推荐
- mysql econnreset_Nodejs 套接字报错处理 Error: read ECONNRESET
- [MySQL usage Script] catch all MySQL time and date types and related operation functions (3)
- go map
- Reflection and imagination on the notation like tool
- 【Hot100】33. Search rotation sort array
- 【MySQL 使用秘籍】一网打尽 MySQL 时间和日期类型与相关操作函数(三)
- "Baidu Cup" CTF competition in September, web:sql
- Idea设置方法注释和类注释
- aspx 简单的用户登录
- redis6主从复制及集群
猜你喜欢
[server data recovery] a case of RAID5 data recovery stored in a brand of server
What are the private addresses
What about data leakage? " Watson k'7 moves to eliminate security threats
Jenkins installation
百度杯”CTF比赛 2017 二月场,Web:爆破-2
"Baidu Cup" CTF competition in September, web:sql
Although the volume and price fall, why are the structural deposits of commercial banks favored by listed companies?
C object storage
Godson 2nd generation burn PMON and reload system
CAN和CAN FD
随机推荐
Integer = = the comparison will unpack automatically. This variable cannot be assigned empty
C object storage
My colleague didn't understand selenium for half a month, so I figured it out for him in half an hour! Easily showed a wave of operations of climbing Taobao [easy to understand]
Godson 2nd generation burn PMON and reload system
aspx 简单的用户登录
Summary and arrangement of JPA specifications
Personal component - message prompt
运筹说 第68期|2022年最新影响因子正式发布 快看管科领域期刊的变化
Idea设置方法注释和类注释
MySQL get time
MMSeg——Mutli-view时序数据检查与可视化
Flutter draws animation effects of wave movement, curves and line graphs
What is a network port
leetcode 10. Regular expression matching regular expression matching (difficult)
redis6事务和锁机制
Apicloud studio3 WiFi real machine synchronization and WiFi real machine preview instructions
Programmer growth Chapter 8: do a good job of testing
Mmseg - Mutli view time series data inspection and visualization
峰会回顾|保旺达-合规和安全双驱动的数据安全整体防护体系
Word document injection (tracking word documents) incomplete