資源簡介
ASP.NET 實現的網絡硬盤,可以作為課程設計學習和使用

代碼片段和文件信息
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?Default?:?System.Web.UI.Page
{
????WebHard?directory?=?new?WebHard();
????public?int?id?;
????public?int?id1?;
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????if?(Session[“UserName“]?==?null?&&?Session[“UserPwd“]?==?null)
????????{
????????????Response.Redirect(“tishi.aspx“);//跳轉到tishi.aspx頁面中?
????????}
????????else
????????{
????????????if?(!this.IsPostBack)
????????????{
????????????????this.LblName.Text?=?“當前用戶“?+?“?“?+?Session[“UserName“].ToString()?+?“?“?+?“歡迎您!“;
????????????????if?(Request[“id“]?!=?null)
????????????????{
????????????????????if?(Int32.TryParse(Request[“id“].ToString()?out?id)?==?false)
????????????????????{
????????????????????????return;
????????????????????}
????????????????}
????????????????if?(Request[“mrid“]?!=?null)
????????????????{
????????????????????if?(Int32.TryParse(Request[“mrid“].ToString()?out?id1)?==?false)
????????????????????{
????????????????????????return;
????????????????????}
????????????????}
????????????????bind();
????????????????if?(id?>?-1)
????????????????{
????????????????????bind(id);
????????????????????int?index?=?0;
????????????????????foreach?(ListItem?item?in?DDLName.Items)
????????????????????{
????????????????????????if?(item.Value.ToLower()?==?id.ToString().ToLower())
????????????????????????{
????????????????????????????DDLName.SelectedIndex?=?index;
????????????????????????????break;
????????????????????????}
????????????????????????index++;
????????????????????}
????????????????????return;
????????????????}
????????????????if?(id?<=?-1?&&?id1?>?-1)
????????????????{
????????????????????bind(id1);
????????????????????int?index?=?0;
????????????????????foreach?(ListItem?item?in?DDLName.Items)
????????????????????{
????????????????????????if?(item.Value.ToLower()?==?id.ToString().ToLower())
????????????????????????{
????????????????????????????DDLName.SelectedIndex?=?index;
????????????????????????????break;
????????????????????????}
????????????????????????index++;
????????????????????}
????????????????????return;
????????????????}
????????????????if?(DDLName.Items.Count?>?0)
????????????????{
????????????????????bind(Convert.ToInt32(DDLName.SelectedValue));
????????????????}
????????????}
????????}
????}
????private?void?bind()
????{???
????????directory.dir(DDLName?-1);
????????if?(DDLName.Items.Count?>?0)
????????{
????????????DDLName.SelectedIndex?=?0;
????????}
????}
????private?void?tree(DropDownList?ddl?DataTable?dt?int?mrid?string?s)
????{
????????DataRow[]?rowList?=?dt.Select(“mrid=‘“?+?mrid.ToString()?+?“‘“);
????????foreach?(DataR
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????9955??2008-09-09?23:45??NetWorkHD\Default.aspx
?????文件???????5859??2008-09-09?23:45??NetWorkHD\Default.aspx.cs
?????文件???????8925??2008-08-18?17:05??NetWorkHD\findpwd.aspx
?????文件????????762??2008-08-10?06:28??NetWorkHD\findpwd.aspx.cs
?????文件??????10985??2008-08-18?17:05??NetWorkHD\findPwd1.aspx
?????文件???????2021??2008-08-10?06:27??NetWorkHD\findPwd1.aspx.cs
?????文件??????13460??2008-08-14?16:25??NetWorkHD\Information.aspx
?????文件???????4725??2008-08-14?11:27??NetWorkHD\Information.aspx.cs
?????文件??????14987??2008-08-22?14:58??NetWorkHD\Insert_Wjj.aspx
?????文件???????3618??2008-08-14?11:21??NetWorkHD\Insert_Wjj.aspx.cs
?????文件???????9928??2008-08-18?17:07??NetWorkHD\Login.aspx
?????文件???????2987??2008-08-11?19:32??NetWorkHD\Login.aspx.cs
?????文件???????4489??2008-08-14?16:27??NetWorkHD\reg_zhuce.aspx
?????文件????????753??2008-08-11?14:14??NetWorkHD\reg_zhuce.aspx.cs
?????文件??????19558??2008-09-09?15:59??NetWorkHD\reg_zhuceadd.aspx
?????文件???????4084??2008-09-09?15:59??NetWorkHD\reg_zhuceadd.aspx.cs
?????文件???????7809??2008-09-09?23:45??NetWorkHD\Select_WJ.aspx
?????文件???????1766??2008-09-09?23:45??NetWorkHD\Select_WJ.aspx.cs
?????文件???????5735??2008-08-18?17:07??NetWorkHD\showfindpwd.aspx
?????文件???????1255??2008-08-10?06:38??NetWorkHD\showfindpwd.aspx.cs
?????文件???????3221??2008-08-14?16:27??NetWorkHD\tishi.aspx
?????文件????????741??2008-08-03?08:33??NetWorkHD\tishi.aspx.cs
?????文件??????13676??2008-09-10?00:47??NetWorkHD\Update_Wj.aspx
?????文件???????2276??2008-09-10?00:47??NetWorkHD\Update_Wj.aspx.cs
?????文件???????8949??2008-08-18?17:05??NetWorkHD\Update_WJJ.aspx
?????文件???????1661??2008-08-14?11:48??NetWorkHD\Update_WJJ.aspx.cs
?????文件???????4096??2008-08-22?14:51??NetWorkHD\Up_WJ.aspx
?????文件???????2022??2008-10-27?13:23??NetWorkHD\Up_WJ.aspx.cs
?????文件???????1087??2008-09-09?15:32??NetWorkHD\Web.config
?????文件????????425??2008-08-02?19:06??NetWorkHD\UserControl\footer.ascx
............此處省略102個文件信息
評論
共有 條評論