登录页面在asp.net [英] Log in page in asp.net
本文介绍了登录页面在asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在asp.net中创建登录页面,请以一种方便的方式告诉我
how to create a login page in asp.net please tell me a conveniante way
推荐答案
登录页面与ASP中的其他网页基本相同.网.您需要输入用户名和密码,登录按钮和(可选)注册按钮的某些字段.我认为您的问题意味着如何在ASP.Net中实现身份验证.这是一个非常简单的问题,可以通过在Google中进行搜索来回答.我的建议是让您先阅读该主题,然后在您的代码中实现该主题之前更好地理解该主题. CP中有几篇文章可能会带给您关于如何执行此操作的先机.尝试阅读以下内容.希望这会有所帮助.
ASP.NET身份验证和授权 [
A login page is basically the same as the other web pages in ASP.Net. You have some fields for the username and password, a login button, and (optional) a signup button. I think your question means how do I implement authentication in ASP.Net. This is a really simple question that can be answered by searching in Google. My advice is for you to read about the topic first and have a better understanding on the topic before implementing it in your code. There are several articles here in CP that might give you a headstart on how to do this. Try reading the following. Hope this helps.
ASP.NET authentication and authorization[^]
签出:
how-to-write-a-simple -login-page-in-aspnet [ ASP.NET身份验证和授权 [ ASP.NET中的表单身份验证和授权 [
check this out:
how-to-write-a-simple-login-page-in-aspnet[^]
you can also go for more secure way, by using form authentication. you may refer these to get started:
ASP.NET authentication and authorization[^]
Form authentication and authorization in ASP.NET[^]
hope it helps :)
这是asp.net中的简单登录页面,无需数据库交互
This is the simple login page in asp.net,without database interaction
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="_Login" %>
<!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></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="lblUsername" runat="server" Text="Username"></asp:Label>
<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
<br />
<br />
<asp:Button ID="btnlogin" runat="server" Text="Login" onclick="btnlogin_Click"
Width="47px" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel"
onclick="btnCancel_Click" />
<br />
<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
</div>
</form>
</body>
</html>
这篇关于登录页面在asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文