FreeTextBox备忘
添加对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备忘的更多相关文章
- GIS部分理论知识备忘随笔
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.高斯克吕格投影带换算 某坐标的经度为112度,其投影的6度带和3度带 ...
- python序列,字典备忘
初识python备忘: 序列:列表,字符串,元组len(d),d[id],del d[id],data in d函数:cmp(x,y),len(seq),list(seq)根据字符串创建列表,max( ...
- Vi命令备忘
备忘 Ctrl+u:向文件首翻半屏: Ctrl+d:向文件尾翻半屏: Ctrl+f:向文件尾翻一屏: Ctrl+b:向文件首翻一屏: Esc:从编辑模式切换到命令模式: ZZ:命令模式下保存当前文件所 ...
- ExtJs4常用配置方法备忘
viewport布局常用属性 new Ext.Viewport({ layout: "border", renderTo: Ext.getBody(), defaults: { b ...
- [备忘] Automatically reset Windows Update components
这两天遇到Windows 10的更新问题,官方有一个小工具,可以用来修复Windows Update的问题,备忘如下 https://support.microsoft.com/en-us/kb/97 ...
- ECMAScript 5(ES5)中bind方法简介备忘
一直以来对和this有关的东西模糊不清,譬如call.apply等等.这次看到一个和bind有关的笔试题,故记此文以备忘. bind和call以及apply一样,都是可以改变上下文的this指向的.不 ...
- MFC通过txt查找文件并进行复制-备忘
MFC基于对话框的Demo txt中每行一个23位的卡号. 文件夹中包含以卡号命名的图像文件.(fpt或者bmp文件) 要求遍历文件夹,找到txt中卡号所对应的图像文件,并复制出来. VC6.0写的. ...
- php 相关模块备忘
在安装php的时候,不管是编译安装: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...
- 『备忘』HttpWebRequest 在 POST 提交时, 标头(Headers)丢失原因
近来研究 HttpWebRequest —— 辅助类完成时,POST JSON数据 总会 丢失标头(Headers). HttpWebRequest POST JSON数据,分如下几步: > 将 ...
随机推荐
- 文件的基本操作(python)
文件打开: 1. f = open('yesterday,‘r+’,encoding = ‘utf-8’) 读取的方式加载为Utf-8 r 打开文件并写, 只适用于文字类 r+ 打开文件并读 ...
- Spring Colud 学习
转自: http://blog.csdn.net/forezp/article/details/70148833#t0
- iKcamp|基于Koa2搭建Node.js实战(含视频)☞ 规范与部署
沪江CCtalk视频地址:https://www.cctalk.com/v/15114923889450 规范与部署 懒人推动社会进步. 本篇中,我们会讲述三个知识点 定制书写规范 开发环境运行 如何 ...
- express + mongodb 搭建一个简易网站 (五)
前面已经将导航中的“所有宝贝”页面连上了mongodb,现在我们就把其他的页面脸上数据库,将整个网站全部实现. 打开routes文件,找到jacket.js,将里面的代码修改如下: var expre ...
- Zookeeper 注册中心
一.Zookeeper的介绍 Zookeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件.它是一个为分布式应用 ...
- 通过Chrome的inspect对手机webview进行调试
使用chrome的inspect可以对手机上的webview进行调试,因为真机没有什么比较好的调试工具,而chrome提供了这一个工具可以比较方便的查看真机上的元素,以及进行调试. 其实我对webvi ...
- Git操作的一些注意
这是在在学习Git时遇到的一些需要注意的地方,都是一些小细节的地方,可能会有错误的地方,希望大家可以指出谢谢 1.git使用,安装后,首先要打开git bash 2.必须登录后才可以操作git ...
- input上传图片
1.通过input自身的onchange事件触发: <input id="file" type="file" accept="image/*&q ...
- cf451C-Predict Outcome of the Game
http://codeforces.com/problemset/problem/451/C A - Predict Outcome of the Game Time Limit:2000MS ...
- app电池续航上&&下--Android自动化测试学习历程
章节:自动化基础篇——电池续航自动化测试上&&下 主要讲解内容及笔记: 一.影响手机电量的因素和理论: 下面是一个表格:当今主流手机显示屏技术.机型与功耗对照表: 技术 类型 ...