当前位置:网站首页>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");
}
}
}
}
边栏推荐
- Go array and slice
- go map
- Programmer growth Chapter 8: do a good job of testing
- mysql econnreset_ Nodejs socket error handling error: read econnreset
- Difference between avc1 and H264
- STM32 reverse entry
- How to choose note taking software? Comparison and evaluation of notion, flowus and WOLAI
- The "Baidu Cup" CTF competition was held in February 2017, Web: explosion-2
- Can and can FD
- With 4 years of working experience, you can't tell five ways of communication between multithreads. Dare you believe it?
猜你喜欢

面试官灵魂拷问:为什么代码规范要求 SQL 语句不要过多的 join?

数据泄露怎么办?'华生·K'7招消灭安全威胁

MySQL --- 数据库查询 - 排序查询、分页查询
![[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel](/img/b6/f9da8a36167db10c9a92dabb166c81.png)
[notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel

Shandong University Summer Training - 20220620

CloudCompare——点云切片

CAN和CAN FD

“百度杯”CTF比赛 九月场,Web:SQL

The real king of caching, Google guava is just a brother

Could not set property 'ID' of 'class xx' with value 'XX' argument type mismatch solution
随机推荐
从外卖点单浅谈伪需求
Sorry, we can't open xxxxx Docx, because there is a problem with the content (repackaging problem)
mysql econnreset_ Nodejs socket error handling error: read econnreset
关于 Notion-Like 工具的反思和畅想
redis6事务和锁机制
私有地址有那些
Notion 类笔记软件如何选择?Notion 、FlowUs 、Wolai 对比评测
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
DataPipeline双料入选中国信通院2022数智化图谱、数据库发展报告
同事半个月都没搞懂selenium,我半个小时就给他整明白!顺手秀了一波爬淘宝的操作[通俗易懂]
Integer = = the comparison will unpack automatically. This variable cannot be assigned empty
MySQL get time
前缀、中缀、后缀表达式「建议收藏」
Go pointer
Could not set property 'ID' of 'class xx' with value 'XX' argument type mismatch solution
数据泄露怎么办?'华生·K'7招消灭安全威胁
Difference between avc1 and H264
Apicloud studio3 WiFi real machine synchronization and WiFi real machine preview instructions
Flutter 3.0更新后如何应用到小程序开发中
aspx 简单的用户登录