91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-24
  • 語言: C#
  • 標簽: ASP.NET??C#??

資源簡介

使用ASP.NET建站時,登錄模塊中常用的技術,解決了客戶重復輸入的用戶名和密碼比較麻煩的問題,實用性很強。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;

public?partial?class?login?:?System.Web.UI.Page
{
????//頁面加載時執行的內容?Start
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????//第一次加載不滿足條件,之后均滿足,將Cookie數據輸出到TextBox里
????????if(Request.Cookies[“username“]!=null&&Request.Cookies[“password“]!=null)
????????{
????????????TextBox1.Text?=?Request.Cookies[“username“].Value.ToString();
????????????TextBox2.Text?=?Request.Cookies[“password“].Value.ToString();
????????}
????}
????//頁面加載時執行的內容?End
????//重置按鈕的功能的實現?Start
????protected?void?Button2_Click1(object?sender?EventArgs?e)
????{
????????this.FindButton(this);
????}
????private?void?FindButton(Control?c)
????{
????????if?(c.Controls?!=?null)
????????{
????????????foreach?(Control?x?in?c.Controls)
????????????{
????????????????if?(x?is?System.Web.UI.WebControls.TextBox)
????????????????{
????????????????????((System.Web.UI.WebControls.TextBox)x).Text?=?““;
????????????????}
????????????????FindButton(x);
????????????}
????????}
????}
????//重置按鈕的功能的實現?End
????//登錄按鈕的功能的實現?Satrt
????protected?void?Button1_Click(object?sender?EventArgs?e)
????{
????????if?(CheckBox1.Checked)
????????{
????????????//創建Cookie對象,保存Cookie數據,設置Cookie保存時間
????????????Response.Cookies[“username“].Value?=?TextBox1.Text;
????????????Response.Cookies[“username“].Expires?=?DateTime.Now.AddSeconds(10);
????????????Response.Cookies[“password“].Value?=?TextBox2.Text;
????????????Response.Cookies[“password“].Expires?=?DateTime.Now.AddSeconds(10);
????????????Response.Redirect(“Test.aspx“);
????????}
????}
????//登錄按鈕的功能的實現?End
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-10-31?20:27??ASP.NET中登錄時記住用戶名和密碼\
?????目錄???????????0??2017-10-31?20:27??ASP.NET中登錄時記住用戶名和密碼\demo\
?????文件?????????409??2017-10-31?17:50??ASP.NET中登錄時記住用戶名和密碼\demo\Test.aspx
?????文件?????????276??2017-10-31?17:49??ASP.NET中登錄時記住用戶名和密碼\demo\Test.aspx.cs
?????文件????????1306??2017-10-31?13:16??ASP.NET中登錄時記住用戶名和密碼\demo\Web.Debug.config
?????文件?????????362??2017-10-31?13:16??ASP.NET中登錄時記住用戶名和密碼\demo\Web.config
?????文件?????????870??2017-10-31?19:26??ASP.NET中登錄時記住用戶名和密碼\demo\login.aspx
?????文件????????1930??2017-10-31?20:26??ASP.NET中登錄時記住用戶名和密碼\demo\login.aspx.cs
?????文件????????1670??2017-10-31?20:26??ASP.NET中登錄時記住用戶名和密碼\localhost_2422.sln
?????文件???????24576??2017-10-31?20:26??ASP.NET中登錄時記住用戶名和密碼\localhost_2422.v11.suo

評論

共有 條評論