Asp.net源码专业站
首页->企业网站->缤纷企业管理系统源码>>Admin/ftb.imagegallery.aspx>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:缤纷企业管理系统源码
当前文件:文件类型 BinFenEnterpriseWeb/Admin/ftb.imagegallery.aspx[1K,2009-6-12 11:33:52]打开代码结构图
普通视图
		            
1<%@ Page Language="C#" ValidateRequest=false Trace="false" %> 2<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %> 3<script runat="server"> 4protected void Page_Load(Object Src, EventArgs E) { 5 6 // *** remove this return statement to use the following code *** 7 return; 8 9 string currentFolder = ImageGallery1.CurrentImagesFolder; 10 11 // modify the directories allowed 12 if (currentFolder == "~/images") { 13 14 // these are the default directories FTB:ImageGallery will find 15 string[] defaultDirectories = System.IO.Directory.GetDirectories(Server.MapPath(currentFolder),"*"); 16 17 // user defined custom directories 18 string[] customDirectories = new string[] {"folder1","folder2"}; 19 20 // the gallery will use these images in this instance 21 ImageGallery1.CurrentDirectories = customDirectories; 22 } 23 24 25 // modify the images allowed 26 if (currentFolder == "~/images") { 27 28 System.IO.DirectoryInfo directoryInfo = new System.IO.DirectoryInfo(Server.MapPath(currentFolder)); 29 30 // these are the default images FTB:ImageGallery will find 31 System.IO.FileInfo[] defaultImages = directoryInfo.GetFiles("*"); 32 33 // user defined custom images (here, we're just allowing the first two) 34 System.IO.FileInfo[] customImages = new System.IO.FileInfo[2] {defaultImages[0], defaultImages[1]}; 35 36 // the gallery will use these images in this instance 37 ImageGallery1.CurrentImages = customImages; 38 } 39 40} 41</script> 42<html> 43<head> 44 <title>Image Gallery</title> 45</head> 46<body> 47 48 <form id="Form1" runat="server" enctype="multipart/form-data"> 49 50 <FTB:ImageGallery id="ImageGallery1" 51 JavaScriptLocation="ExternalFile" 52 UtilityImagesLocation="ExternalFile" 53 SupportFolder="~/aspnet_client/FreeTextBox/" 54 AllowImageDelete=true AllowImageUpload=true AllowDirectoryCreate=true AllowDirectoryDelete=true runat="Server" /> 55 56 </form> 57 58</body> 59</html> 60
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:缤纷企业管理系统源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146