添加对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. libcurl 不支持https访问

    项目中使用libcurl 访问https的时候会报错,比如:“Unsupported protocol” 或者:“Protocol https not supported or disabled in ...

  2. Qt 的事件

    一个事件由一个特定的QEvent子类来表示,如QMouseEvent.QKeyEvent 处理一个事件的方法: 方法一:重新实现部件的paintEvent.mousePressEvent等事件处理函数 ...

  3. mysql之MMM高可用方案简介

    MMM(Master-Master Replication Manager for MySQL) MySQL主主复制管理器,提供了MySQL主主复制配置的监控.故障转移和管理的一套可伸缩的脚本套件.在 ...

  4. 第七章 二叉搜索树 (d3)AVL树:删除

  5. Winsock版本的“hello world!”

    1.基于TCP协议的“hello world!” 1)服务器端:WSAStartup()->socket()->bind()->listen()->accept()->s ...

  6. Python3 filter() 函数

    Python3 filter() 函数  Python3 内置函数 描述 filter() 函数用于过滤序列,过滤掉不符合条件的元素,返回一个迭代器对象,如果要转换为列表,可以使用 list() 来转 ...

  7. Python3 ord() 函数

    Python3 ord() 函数  Python3 内置函数 描述 ord() 函数是 chr() 函数(对于 8 位的 ASCII 字符串)的配对函数,它以一个字符串(Unicode 字符)作为参数 ...

  8. Python str() 函数

    Python str() 函数  Python 内置函数 描述 str() 函数将对象转化为适于人阅读的形式. 语法 以下是 str() 方法的语法: class str(object='') 参数 ...

  9. Minimum Cost(最小费用最大流,好题)

    Minimum Cost http://poj.org/problem?id=2516 Time Limit: 4000MS   Memory Limit: 65536K Total Submissi ...

  10. 【校招面试 之 剑指offer】第11题 旋转数组中的最小数字

    题目:把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转.输入一个递增排序的数组的一个旋转,输出旋转数组的最小元素.例如: 数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转, ...