2005年11月16日

摘要: long i; string path=Server.MapPath(".\\cc"); DirectoryInfo dinfo=new DirectoryInfo(path); DirectoryInfo[] df=dinfo.GetDirectories(); foreach(DirectoryInfo din in df) { foreach(FileInfo... 阅读全文
posted @ 2005-11-16 14:26 .net技術 阅读(194) 评论(0) 推荐(0)

2005年11月2日

摘要: ASP.NET中,经常会使用到templates(模版)功能,比如在datagrid,datalist,repeater等控件中,使用templates,将会大大增强其功能。以往,我们一般是在设计程序时,就已经设置好控件中的模版是怎样的了。但是,有的时候,可能我们需要动态加载模版,比如,当你要求你的应用程序的界面风格随着用户的需求而变化时,你就需要到动态加载模版的功能了。但要注意的是,并不是所有的... 阅读全文
posted @ 2005-11-02 23:11 .net技術 阅读(207) 评论(0) 推荐(0)

2005年10月31日

摘要: private void Btn_Upload_Click(object sender, System.EventArgs e) { if(UploadFile.PostedFile.FileName.Trim()!="") { //上传文件 string extension =... 阅读全文
posted @ 2005-10-31 17:34 .net技術 阅读(220) 评论(0) 推荐(0)

2005年10月10日

摘要: //通过user_id返回留言集合 public ArrayList GetCommentboardsByUidPage(int user_id,int pagenumber) { IDbCommand m_Command = DataAccess.GetCommand(); m_Command.CommandType = CommandType.StoredProcedure;... 阅读全文
posted @ 2005-10-10 09:57 .net技術 阅读(259) 评论(0) 推荐(0)

2005年10月9日

摘要: 动态加载用户控件:想要用程序控制方法给web form网页加入用户控件,依照布凑进行1:先将欲动态加入用户控件的web form的网页的。aspx文件切换到html视图,然后在顶端使用语法如下的@Reference指令语句来登陆用户控件:@Reference指令能够让你以动态方法编译与链接用户控件,并将它加至网页的ControlCollection对象中,此举可以让你在调用LoadControl方... 阅读全文
posted @ 2005-10-09 16:06 .net技術 阅读(1529) 评论(1) 推荐(0)

2005年10月6日

摘要: 阅读全文
posted @ 2005-10-06 23:02 .net技術 阅读(329) 评论(4) 推荐(0)

2005年9月18日

摘要: string pathstr="\\temp\\temp1"; string dr=Server.MapPath(pathstr); if(!Directory.Exists(dr)) //沒有目錄就創建目錄 Directory.CreateDirectory(dr); string fname=Path.GetFileName(File1.PostedFile... 阅读全文
posted @ 2005-09-18 17:33 .net技術 阅读(346) 评论(0) 推荐(0)
 
摘要: 在标签中加入 enctype="multipart/form-data"属性//上传图片 Stream imageStream=File1.PostedFile.InputStream; string imageType=File1.PostedFile.ContentType; int imageSize=File1.PostedFile.ContentLength; ... 阅读全文
posted @ 2005-09-18 10:40 .net技術 阅读(560) 评论(0) 推荐(0)

2005年8月7日

摘要: private void ShopCar(int id,string name,double price,int numble,int tag) //tag等于1为增加商品,0为减 { System.Data.DataTable dt; if(HttpContext.Current.Session["shop_car"]==null) { dt=new DataTable... 阅读全文
posted @ 2005-08-07 14:31 .net技術 阅读(496) 评论(1) 推荐(0)

2005年8月6日

摘要: 一,一种方式:1、html 脚本:function controltime() { var da=new Date(); if(da.getDay()==6 || da.getDay()==5) //取得今天是星期几{ alert("对不起你不能输入");return false;} else return true; } 2、 cs代码:private void Lodd_Page(Ob... 阅读全文
posted @ 2005-08-06 16:54 .net技術 阅读(599) 评论(0) 推荐(0)