問(wèn):asp.net 跑馬燈 怎樣從文件夾里讀取圖片,怎樣實(shí)現(xiàn)?
答:
DirectoryInfo imagesfile = new DirectoryInfo(Server.MapPath("../images/"));
Repeater1.DataSource = imagesfile.GetFiles("*.jpg");
Repeater1.DataBind();
引用的時(shí)候重要的是路徑,路徑寫(xiě)成你自己的。
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)
點(diǎn)擊舉報(bào)。