資源簡(jiǎn)介
能夠進(jìn)行簡(jiǎn)單的注冊(cè)登錄,還有管理員的管理,留言板的簡(jiǎn)單管理
代碼片段和文件信息
using?System;
using?System.Data;
using?System.Configuration;
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;
using?System.Collections;//arraylist
public?partial?class?_Default?:?System.Web.UI.Page?
{
???????
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????String?arID?=?Request.QueryString[“puid“];
????????String?yin?=?Request.QueryString[“yincang“];?
????????int?inde=?0;
?????????if?(yin?!=?null?&&?yin.Length?!=?0)
?????????{
?????????????inde?=?int.Parse(yin);
?????????}
?????????MultiView1.ActiveViewIndex?=?inde;
????????if?(arID?!=?null&&arID.Length!=0)
???????{
???????????String?strsend?=?“select?yonghu.郵箱yonghu.網(wǎng)名send.發(fā)表時(shí)間send.內(nèi)容send.題目send.文章編號(hào)yonghu.圖片?from?sendyonghu?where?send.文章編號(hào)=?“?+?arID?+?“?and?send.留言者號(hào)=yonghu.編號(hào)“;
???????????MyMessage?db?=?new?MyMessage();
???????????SqlConnection?con?=?db.GetCon();
???????????SqlDataAdapter?da?=?new?SqlDataAdapter(strsend?con);
???????????DataSet?ds?=?new?DataSet();
???????????da.Fill(ds);
???????????DataList1.DataSource?=?ds.Tables[0];//以下綁定datalist的數(shù)據(jù)源
???????????DataList1.DataBind();
???????????String?strsend1?=?“select?yonghu.郵箱yonghu.網(wǎng)名back.回復(fù)時(shí)間back.回復(fù)內(nèi)容yonghu.圖片?from?backyonghusend?where?send.文章編號(hào)=?“?+?arID?+?“?and?send.文章編號(hào)=back.文章號(hào)?and?back.回復(fù)人號(hào)=yonghu.編號(hào)“;
???????????MyMessage?db1?=?new?MyMessage();
???????????SqlConnection?con1?=?db1.GetCon();
???????????SqlDataAdapter?da1?=?new?SqlDataAdapter(strsend1?con1);
???????????DataSet?ds1?=?new?DataSet();
???????????da1.Fill(ds1);
???????????DataList2.DataSource?=?ds1.Tables[0];//以下綁定datalist的數(shù)據(jù)源
???????????DataList2.DataBind();
???????}
????????
????}
????protected?void?Button2_Click(object?sender?EventArgs?e)
????{
???????
????????MyMessage?db?=?new?MyMessage();
????????string?userName?=?TextName.Text.Trim();//去除空格鍵
????????string?passWord?=?TextCode.Text.Trim();
????????//獲取用戶(hù)信息
????????SqlDataReader?dr?=?db.reDr(“select?*?from?[yonghu]?where?網(wǎng)名=‘“?+?userName?+?“‘?and?密碼=‘“?+?passWord?+?“‘“);
????????dr.Read();
????????if?(dr.HasRows)//通過(guò)dr中是否包含行判斷用戶(hù)是否通過(guò)身份驗(yàn)證
????????{
?????????????String?id;
????????????//記錄ID
????????????Session[“網(wǎng)名“]?=?userName;
????????????Session[“密碼“]?=?passWord;
????????????MyMessage?pdID?=?new?MyMessage();
????????????SqlConnection?pdIDcon?=?pdID.GetCon();
????????????pdIDcon.Open();
????????????String?strsend?=?“select?編號(hào)標(biāo)志?from?yonghu?where?網(wǎng)名=‘“?+?userName?+?“‘?and?密碼=‘“?+?passWord?+?“‘“;
????????????SqlCommand?pdIDcom?=?new?SqlCommand(strsend?pdIDcon);
????????????SqlDataReader?pdIDdr?=?pdIDcom.ExecuteReader(CommandBehavior.CloseConnection);
????????????while?(pdIDdr.Read())
????????????{
????????????????Label1.Text=?pdIDdr[“編號(hào)“].ToString();
????????????????Label2.Text?=?pdIDdr[“標(biāo)志“].ToString();
????????????}
????????????pdIDdr.Close();
????
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2011-10-31?21:05??留言板\
?????目錄???????????0??2011-06-07?20:15??留言板\數(shù)據(jù)源\
?????文件?????3145728??2011-11-02?21:40??留言板\數(shù)據(jù)源\message.mdf
?????文件?????1048576??2011-11-02?21:40??留言板\數(shù)據(jù)源\message_log.ldf
?????目錄???????????0??2011-10-31?21:05??留言板\留言板\
?????目錄???????????0??2011-10-31?21:05??留言板\留言板\App_Code\
?????文件????????3568??2011-06-12?16:54??留言板\留言板\App_Code\Class1.cs
?????目錄???????????0??2011-06-09?13:32??留言板\留言板\App_Data\
?????文件???????11472??2011-06-12?21:42??留言板\留言板\Default.aspx
?????文件????????3773??2011-06-13?20:48??留言板\留言板\Default.aspx.cs
?????目錄???????????0??2011-10-31?21:05??留言板\留言板\image\
?????文件?????????125??2011-06-10?22:41??留言板\留言板\image\001.gif
?????文件?????????125??2011-06-10?22:41??留言板\留言板\image\002.gif
?????文件?????????125??2011-06-10?22:41??留言板\留言板\image\003.gif
?????文件???????29742??2011-06-08?10:42??留言板\留言板\image\biaoti.jpg
?????文件???????66507??2011-06-08?10:32??留言板\留言板\image\biaotou.jpg
?????文件???????14375??2011-06-08?11:28??留言板\留言板\image\denglulan.jpg
?????文件???????18443??2011-06-08?11:30??留言板\留言板\image\denglulan_conew5.jpg
?????文件????????1034??2011-06-10?22:41??留言板\留言板\image\qq.gif
?????文件?????????260??2011-06-10?22:41??留言板\留言板\image\showbj.gif
?????文件?????????482??2011-06-12?21:15??留言板\留言板\muban.css
?????目錄???????????0??2011-10-31?21:05??留言板\留言板\UploadedImages\
?????文件?????1825994??2011-06-12?08:01??留言板\留言板\UploadedImages\DSC00014.JPG
?????文件?????1319355??2011-06-11?22:20??留言板\留言板\UploadedImages\DSC00055.JPG
?????文件?????2000585??2011-06-11?22:41??留言板\留言板\UploadedImages\DSC00056.JPG
?????文件?????1994102??2011-06-11?21:37??留言板\留言板\UploadedImages\DSC00057.JPG
?????文件?????2103541??2011-06-12?08:04??留言板\留言板\UploadedImages\DSC00080.JPG
?????文件?????2363740??2011-06-12?10:33??留言板\留言板\UploadedImages\DSC00167.JPG
?????文件?????1122161??2011-06-11?22:49??留言板\留言板\UploadedImages\DSC00169.JPG
?????文件?????2133004??2011-06-11?21:32??留言板\留言板\UploadedImages\DSC00178.JPG
?????文件?????1002250??2011-06-11?21:44??留言板\留言板\UploadedImages\DSC00179.JPG
............此處省略16個(gè)文件信息
評(píng)論
共有 條評(píng)論