添加对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. oracle imp dmp

    windows>cmd> imp userid=用户名/密码@orcl file=d:\nc60.dmp full=y imp userid=SYSTEM/password@orcl fi ...

  2. Spring Boot 入门搭建

    一.前言 Spring Boot 的设计目的是用来简化新 Spring 应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置. 二.环境搭建 创建一个 ...

  3. Simple2D-17(音乐播放器)嵌入 ImGui 库

    要把 ImGui 应用到项目中,先拷贝方框中的源文件到项目: 这些文件是 ImGui 的实现源码,可作为第三方库新建一个文件夹进行放置. 接下来是渲染部分的代码,项目可能使用 DirectX 或 Op ...

  4. Java中3种代理总结(示例代码见之前文章)

    1.JDK静态代理 业务接口 接口的实现类 代理类,实现接口,并扩展实现类的功能 ### 2.JDK动态代理 业务接口 实现了业务接口的业务类 实现了InvocationHandler接口的handl ...

  5. websocket使用

    兼容性介绍 : https://caniuse.com/#search=websockets var websocket = null; //判断当前浏览器是否支持WebSocket if ('Web ...

  6. LESS CSS 实例

    值得参考的 10 个 LESS CSS 实例   2 收藏(185) LESS, Sass 和其他 CSS 预处理器是一种超棒的方法用来扩展 CSS 功能,使之更适合程序员.你可以使用变量.函数.混合 ...

  7. python内存泄漏

    记录: 一个脚本在连续运行后,使用内存越来越大,在循环后手动添加gc.collect()没有作用. 尝试方法: 去除所有函数中当作参数传入的全局变量 使用全局redis对象,不再当作参数传入 循环末尾 ...

  8. Nginx主动检测方案---Tengine

    方案选择大致如下: 1.用Tengine来代替Nginx,   http://tengine.taobao.org/ Tengine是由淘宝网发起的Web服务器项目.它在Nginx的基础上,针对大访问 ...

  9. redis-trib.rb报错:/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis (LoadError)

    报错如下: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis ...

  10. Eclipse中Ctrl+Shift+f快捷键无效的解决方式

    某天突然发现idea非常重要的快捷键ctrl+shift+f无效了,网上搜了很多都说是qq快捷键冲突,但是找了下qq快捷键却没有解决,现在给大家一个解决快捷键冲突的思路: 1.查看QQ快捷键--> ...