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

  • 大小: 2.7MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-30
  • 語言: C#
  • 標簽: ASP.NET??聊天室??

資源簡介

一個小型的課程設計,使用Mysql數據庫,用戶名root 密碼:admin 內含建表腳本

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?MySql.Data.MySqlClient;
using?System.Configuration;

namespace?聊天室
{
????public?partial?class?Master?:?System.Web.UI.MasterPage
????{
????????protected?void?Page_Load(object?sender?EventArgs?e)
????????{
????????????//?1.驗證用戶是否已經登錄,如果未登錄就不能訪問該頁面
????????????//?檢查登錄狀態,如果未登錄則結束
????????????if?(!verifyLoginState())
????????????????return;

????????????//?2.列出除了自己以外的好友列表
????????????//?從配置文件中讀取數據庫連接串(Web.config)
????????????string?connStr?=?ConfigurationManager.ConnectionStrings[“DatabaseConnectionString“].ToString();
????????????//?創建數據庫連接
????????????MySqlConnection?conn?=?new?MySqlConnection(connStr);
????????????//?打開數據連接
????????????conn.Open();
????????????//?創建Command對象,執行一條SQL語句【查詢】
????????????MySqlCommand?cmd?=?new?MySqlCommand(“SELECT?*?FROM?user?WHERE?id<>@id“?conn);
????????????cmd.Parameters.Add(new?MySqlParameter(“id“?Session[“UserID“]));
????????????//?讀取結果
????????????MySqlDataReader?reader?=?cmd.ExecuteReader();
????????????string?content?=?““;//?要輸出到網頁的內容
????????????string?temp?=?null;?//?每一條數據的臨時構成:臨時變量//?@“
  • ?孫永政?
  • “;
    ????????????//?從reader?對象中循環讀出查詢結果
    ????????????while?(reader.Read())
    ????????????{
    ????????????????//?構成頁面上的一個輸出
    ????????????????temp?=?“
  • ?“?+?reader.GetString(“name“)?+?“?
  • “;
    ????????????????content?+=?temp;
    ????????????}
    ????????????//?找到?頁面上的Literal控件,輸出查詢結果
    ????????????FriendsList.Text?=?content;
    ????????????//?關閉數據庫連接
    ????????????reader.Close();
    ????????????conn.Close();
    ????????????//?3.。。。。。。
    ????????}
    ????????///?
    ????????///?驗證登錄狀態
    ????????///?

    ????????private?bool?verifyLoginState()
    ????????{
    ????????????//?查詢Session中是否包含Login而且值為True
    ????????????if?(!“True“.Equals(Session[“Login“]))
    ????????????{
    ????????????????Response.Clear();
    ????????????????Response.Redirect(“/pages/Login.aspx“);
    ????????????????return?false;
    ????????????}
    ????????????else
    ????????????????return?true;
    ????????}
    ????}
    }

    ?屬性????????????大小?????日期????時間???名稱
    -----------?---------??----------?-----??----

    ?????文件????????863??2016-07-07?10:22??聊天室\sql.sql

    ?????文件??????14848??2016-07-07?18:53??聊天室\聊天室\bin\聊天室.dll

    ?????文件????????585??2016-07-03?23:43??聊天室\聊天室\bin\聊天室.dll.config

    ?????文件??????38400??2016-07-07?18:53??聊天室\聊天室\bin\聊天室.pdb

    ?????文件????????919??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\.bower.json

    ?????文件????????641??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\bower.json

    ?????文件????????425??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\CHANGELOG.md

    ?????文件??????26132??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap-theme.css

    ?????文件??????47706??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap-theme.css.map

    ?????文件??????23409??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap-theme.min.css

    ?????文件???????5532??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap-theme.min.css.map

    ?????文件?????146082??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap.css

    ?????文件?????389227??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap.css.map

    ?????文件?????121260??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap.min.css

    ?????文件??????54416??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\css\bootstrap.min.css.map

    ?????文件??????20127??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\fonts\glyphicons-halflings-regular.eot

    ?????文件?????108738??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\fonts\glyphicons-halflings-regular.svg

    ?????文件??????45404??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\fonts\glyphicons-halflings-regular.ttf

    ?????文件??????23424??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\fonts\glyphicons-halflings-regular.woff

    ?????文件??????18028??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\fonts\glyphicons-halflings-regular.woff2

    ?????文件??????68954??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\js\bootstrap.js

    ?????文件??????36868??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\js\bootstrap.min.js

    ?????文件????????484??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\dist\js\npm.js

    ?????文件??????20127??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\fonts\glyphicons-halflings-regular.eot

    ?????文件?????108738??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\fonts\glyphicons-halflings-regular.svg

    ?????文件??????45404??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\fonts\glyphicons-halflings-regular.ttf

    ?????文件??????23424??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\fonts\glyphicons-halflings-regular.woff

    ?????文件??????18028??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\fonts\glyphicons-halflings-regular.woff2

    ?????文件????????119??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\grunt\.jshintrc

    ?????文件????????990??2016-07-03?23:21??聊天室\聊天室\bower_components\bootstrap\grunt\bs-commonjs-generator.js

    ............此處省略927個文件信息

    評論

    共有 條評論