当前位置:网站首页>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");
}
}
}
}
边栏推荐
- 蜀天梦图×微言科技丨达梦图数据库朋友圈+1
- 百度杯”CTF比赛 2017 二月场,Web:爆破-2
- What happened to the communication industry in the first half of this year?
- mysql econnreset_ Nodejs socket error handling error: read econnreset
- MMSeg——Mutli-view时序数据检查与可视化
- Notion 类笔记软件如何选择?Notion 、FlowUs 、Wolai 对比评测
- Fragmented knowledge management tool memos
- Summary and arrangement of JPA specifications
- Flutter InkWell & Ink组件
- [notes of in-depth study paper]uctransnet: rethink the jumping connection in u-net from the perspective of transformer channel
猜你喜欢

FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze

Could not set property ‘id‘ of ‘class XX‘ with value ‘XX‘ argument type mismatch 解决办法

真正的缓存之王,Google Guava 只是弟弟

French scholars: the explicability of counter attack under optimal transmission theory

Shandong University Summer Training - 20220620

Don't know these four caching modes, dare you say you understand caching?

南理工在线交流群

CloudCompare——点云切片

ASEMI整流桥HD06参数,HD06图片,HD06应用

Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
随机推荐
Win10——轻量级小工具
Laravel框架运行报错:No application encryption key has been specified
redis6事务和锁机制
Apicloud studio3 API management and debugging tutorial
STM32 reverse entry
通讯录(链表实现)
这18个网站能让你的页面背景炫酷起来
Catch all asynchronous artifact completable future
MySQL - database query - sort query, paging query
Win10 - lightweight gadget
【Hot100】34. 在排序数组中查找元素的第一个和最后一个位置
Write API documents first or code first?
[deep learning paper notes] hnf-netv2 for segmentation of brain tumors using multimodal MR imaging
Summary and arrangement of JPA specifications
Resttemplate details
APICloud Studio3 API管理与调试使用教程
法国学者:最优传输理论下对抗攻击可解释性探讨
FPGA learning notes: vivado 2019.1 add IP MicroBlaze
Matlab paper chart standard format output (dry goods)
蜀天梦图×微言科技丨达梦图数据库朋友圈+1