添加对4.0的dll文件引用

吧aspnet_client目录 copy到根目录下

设置文件上传目录属性ImageGalleryPath

设置相册属性到 ftb.imagegallery.aspx位置,需要根据需要调整下里面的代码

/*
*FreeTextBox 设置
*FreeTextBox控间的 ImageGalleryPath 是文件上传保存的路径
*下面的设置是用户允许选择的目录
*与目录下可以选择的文件
* FreeTextBox会启动文件监视功能
* 插入图片是,FreeTextBox中至少有一个输入字符(可以是空格)
*/

<%@ Page Language="C#" ValidateRequest="false" Trace="false" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<script runat="server">
/*
*FreeTextBox 设置
*FreeTextBox控间的 ImageGalleryPath 是文件上传保存的路径
*下面的设置是用户允许选择的目录
*与目录下可以选择的文件
* FreeTextBox会启动文件监视功能
* 插入图片是,FreeTextBox中至少有一个输入字符(可以是空格)
*/
private static string C_Dir = "~/ftbUpImgs";
protected void Page_Load(Object Src, EventArgs E) { // *** remove this return statement to use the following code ***
//return; ImageGallery1.CurrentImagesFolder =C_Dir ;
string currentFolder = ImageGallery1.CurrentImagesFolder; // modify the directories allowed
if (currentFolder ==C_Dir)
{ // these are the default directories FTB:ImageGallery will find
string[] defaultDirectories = System.IO.Directory.GetDirectories(Server.MapPath(currentFolder), "*"); //// the gallery will use these images in this instance
ImageGallery1.CurrentDirectories = new string[]{};// customDirectories;
} // modify the images allowed
if (currentFolder == C_Dir)
{ System.IO.DirectoryInfo directoryInfo = new System.IO.DirectoryInfo(Server.MapPath(currentFolder)); // these are the default images FTB:ImageGallery will find
System.IO.FileInfo[] defaultImages = directoryInfo.GetFiles("*"); // user defined custom images (here, we're just allowing the first two)
System.IO.FileInfo[] customImages = defaultImages;// new System.IO.FileInfo[2] { defaultImages[0], defaultImages[1] }; // the gallery will use these images in this instance
ImageGallery1.CurrentImages = customImages;
} }
</script>
<html>
<head>
<title>Image Gallery</title>
</head>
<body> <form id="Form1" runat="server" enctype="multipart/form-data"> <FTB:ImageGallery id="ImageGallery1"
AllowImageDelete=false AllowImageUpload=true AllowDirectoryCreate=false AllowDirectoryDelete=false runat="Server" /> </form> </body>
</html>

FreeTextBox备忘的更多相关文章

  1. GIS部分理论知识备忘随笔

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.高斯克吕格投影带换算 某坐标的经度为112度,其投影的6度带和3度带 ...

  2. python序列,字典备忘

    初识python备忘: 序列:列表,字符串,元组len(d),d[id],del d[id],data in d函数:cmp(x,y),len(seq),list(seq)根据字符串创建列表,max( ...

  3. Vi命令备忘

    备忘 Ctrl+u:向文件首翻半屏: Ctrl+d:向文件尾翻半屏: Ctrl+f:向文件尾翻一屏: Ctrl+b:向文件首翻一屏: Esc:从编辑模式切换到命令模式: ZZ:命令模式下保存当前文件所 ...

  4. ExtJs4常用配置方法备忘

    viewport布局常用属性 new Ext.Viewport({ layout: "border", renderTo: Ext.getBody(), defaults: { b ...

  5. [备忘] Automatically reset Windows Update components

    这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...

  6. ECMAScript 5(ES5)中bind方法简介备忘

    一直以来对和this有关的东西模糊不清,譬如call.apply等等.这次看到一个和bind有关的笔试题,故记此文以备忘. bind和call以及apply一样,都是可以改变上下文的this指向的.不 ...

  7. MFC通过txt查找文件并进行复制-备忘

    MFC基于对话框的Demo txt中每行一个23位的卡号. 文件夹中包含以卡号命名的图像文件.(fpt或者bmp文件) 要求遍历文件夹,找到txt中卡号所对应的图像文件,并复制出来. VC6.0写的. ...

  8. php 相关模块备忘

    在安装php的时候,不管是编译安装: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...

  9. 『备忘』HttpWebRequest 在 POST 提交时, 标头(Headers)丢失原因

    近来研究 HttpWebRequest —— 辅助类完成时,POST JSON数据 总会 丢失标头(Headers). HttpWebRequest POST JSON数据,分如下几步: > 将 ...

随机推荐

  1. WebRTC内置debug工具,详细参数解读 chrome://webrtc-internals/

    为了确保这篇文章所写内容尽可能的准确,我决定请来Philipp Hancke来作为此篇文章的共同作者. 当你想要找到你WebRTC产品中的问题时,webrtc-internals是一个非常棒的工具,因 ...

  2. greenlet 实现手动协程切换

    from greenlet import greenlet def test1(): print('12') gr2.switch() #切换到gr2 print('34') gr2.switch() ...

  3. 通过sizeof获得数组长度的方法

    int a[20]; int len = sizeof(a)/sizeof(*a); //值为20,即数组长度为20 注:sizeof是一个操作符,sizeof的值在编译时确定

  4. focusin 事件| focusout事件

    focusin 定义和用法 当元素(或在其内的任意元素)获得焦点时发生 focusin 事件. 当在元素或在其内的任意元素上发生 focus 事件时,focusin() 方法添加要运行的函数. 与 f ...

  5. EasyMock使用总结

    最重要的事说在前面:遇到一个你不熟悉的知识,一定要去官网仔仔细细的看官方文档!一定要仔仔细细!一定要!(尔康鼻孔脸..) 正篇: 一.使用 首先,当然是添加依赖,有人用maven,有人用ant或者ma ...

  6. cvc-complex-type.2.3: Element 'beans' cannot have character [children]

    当启动spring的项目时,有时候会抛如下异常: Line 33 in XML document from ServletContext resource [/WEB-INF/backend-serv ...

  7. No matter how hard it is or no matter how bad it gets, I am going to make it!

    No matter how hard it is or no matter how bad it gets, I am going to make it! He always had a yearni ...

  8. ubuntu 16.04 完整安装 phantomjs

    摘自 stackoverflow sudo apt-get install nodejssudo apt-get install nodejs-legacysudo apt-get install n ...

  9. 基元线程同步构造之waithandle中 waitone使用

    在使用基元线程同步构造中waithandle中waitone方法的讲解: 调用waithandle的waitone方法阻止当前线程(提前是其状态为Nonsignaled,即红灯),直到当前的 Wait ...

  10. GEOquery

    1)介绍 来自NCBI的Gene Expression Omnibus(GEO)作为各种高通量实验数据的公共存储库. 这些数据包括基于单通道和双通道微阵列的实验,测量mRNA,基因组DNA和蛋白质丰度 ...