資源簡介
基于asp的動態網頁設計的一個課程設計,包含任務書,需求分析,數據庫數據庫,希望對大家有用
代碼片段和文件信息
using?System;
using?System.Data;
using?System.Configuration;
using?System.Collections;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.Data.SqlClient;
public?partial?class?login_users?:?System.Web.UI.Page
{
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????}
????protected?void?ImageButton1_Click(object?sender?ImageClickEventArgs?e)
????{
????????????string?username?=?txt_username.Text.Trim();
????????????string?password?=?FormsAuthentication.HashPasswordForStoringInConfigFile(txt_pwd.Text.Trim()?“MD5“);
????????????string?usertype?=?“2“;
????????????SqlConnection?cn?=?new?SqlConnection();
????????????cn.ConnectionString?=?“Data?Source=(local);Initial?Catalog=house;Integrated?Security=True“;
????????????cn.Open();
????????????SqlCommand?com?=?new?SqlCommand();
????????????com.CommandText?=?“select?*?from?users?where?username=‘“?+?username?+?“‘?and?password=‘“?+?password?+?“‘??and?usertype=‘“?+?usertype?+?“‘“;
????????????com.Connection?=?cn;
????????????SqlDataReader?dr?=?com.ExecuteReader();
????????????if?(dr.HasRows?==?true)
????????????{
????????????????Session[“username“]?=?txt_username.Text.Trim();
????????????????Response.Redirect(“defend.aspx“);
????????????????Response.Write(“ript?language=javascript>?alert(‘登陸成功!‘)? ript>“);
????????????}
????????????else
????????????{
????????????????Response.Write(“ript?language=javascript>?alert(‘用戶名或密碼錯誤!‘)? ript>“);
????????????}
????????????dr.Close();
????????????cn.Close();
????????}
????}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2570??2009-07-01?10:29??house\程序\house\search.aspx.cs
?????文件???????1990??2009-07-06?14:12??house\程序\house\index.aspx.cs
?????文件??????11230??2009-07-03?11:12??house\程序\house\search.aspx
?????文件???????1907??2009-07-02?10:21??house\程序\house\Web.Config
?????文件???????1718??2009-07-06?14:17??house\程序\house\login.aspx.cs
?????文件????????405??2009-06-29?14:20??house\程序\house\info.aspx.cs
?????文件???????7868??2009-07-06?14:17??house\程序\house\login.aspx
?????文件??????10326??2009-07-06?13:33??house\程序\house\defend.aspx
?????文件???????8360??2009-07-03?11:12??house\程序\house\message.aspx
?????文件???????8475??2009-07-03?11:12??house\程序\house\manage.aspx
?????文件????????407??2009-07-02?10:39??house\程序\house\manage.aspx.cs
?????文件???????7563??2009-07-03?11:12??house\程序\house\discuss.aspx
?????文件????????435??2009-07-06?14:16??house\程序\house\defend.aspx.cs
?????文件??????10182??2009-07-06?11:52??house\程序\house\defend_message.aspx
?????文件??????11016??2009-07-03?11:12??house\程序\house\info.aspx
?????文件???????1662??2009-07-02?09:48??house\程序\house\message.aspx.cs
?????文件????????408??2009-07-02?09:56??house\程序\house\discuss.aspx.cs
?????文件???????2691??2009-07-06?13:25??house\程序\house\regist1.aspx.cs
?????文件????????415??2009-07-03?10:50??house\程序\house\defend_message.aspx.cs
?????文件???????8014??2009-07-03?11:12??house\程序\house\regist.aspx
?????文件???????1722??2009-07-06?14:18??house\程序\house\adm_login.aspx.cs
?????文件???????7858??2009-07-03?11:12??house\程序\house\adm_login.aspx
?????文件??????12028??2009-07-03?11:12??house\程序\house\regist1.aspx
?????文件????????407??2009-07-03?08:13??house\程序\house\regist.aspx.cs
?????文件??????18699??2009-07-06?14:11??house\程序\house\index.aspx
?????文件??????11168??2009-07-03?11:12??house\程序\house\deatils.aspx
?????文件???????1661??2009-07-02?10:17??house\程序\house\deatils.aspx.cs
?????文件??????20190??2009-07-07?08:32??house\程序\house\manage_info.aspx
?????文件???????3322??2009-07-07?09:24??house\程序\house\manage_info.aspx.cs
?????文件???????2519??2009-07-07?10:26??house\程序\house\changepwd.aspx.cs
............此處省略95個文件信息
- 上一篇:c 課程設計 職工信息管理系統
- 下一篇:C 修改文件屬性工具
評論
共有 條評論