FreeTextBox使用详解
来源:互联网 发布:手机手写软件 编辑:程序博客网 时间:2024/04/29 10:36
FreeTextBox使用详解
Author: Annerose Date:2005-12-16
版本: FreeTextBox 3.1.1 ASP.NET1.1
1.下载 FreeTextBox 3.1.1 (released 2005/11/08)
http://www.freetextbox.com/downloads.aspx
2. 安装
FreeTextBox 3.0以上版本均支持内部模式,即图片资源和javascript都集成在dll中, 本文仅探讨内部模式(Internal Resources).
1 ) 把FTBv3-1-1/Framework-1.1/FreetextBox.dll拷入bin目录.
2) 在项目中添加FreetextBox.dll的dll引用
3) Web.config加入如下代码
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<httpHandlers>
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
</httpHandlers>
</system.web>
</configuration>
3. 使用FreeTextBox
1) aspx页面顶上
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
2) 调用
<FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
3)工具栏皮肤
ToolbarStyleConfiguration = Offoce2003/OfficeXP/Office2000/MAC
4) 得到保存编辑的内容
private void InitializeComponent()
{
this.FreeTextBox1.SaveClick += new System.EventHandler(this.FreeTextBox1_SaveClick);
this.Button1.Click += new System.EventHandler(this.FreeTextBox1_SaveClick);
this.Load += new System.EventHandler(this.Page_Load);
}
private void FreeTextBox1_SaveClick(object sender, System.EventArgs e)
{
divshow.InnerHtml = FreeTextBox1.Text;
}
5) 从客户端中检测到有潜在危险的 Request.Form 值
<%@ Page language="c#" ... ValidateRequest="false"%>
4 图片上传
1) 工具栏上添加ImageGallery按钮.
<FTB:FreeTextBox ..ToolbarLayout=" ..,InsertImageFromGallery,.. />
2) 拷贝 "ftb.imagegallery.aspx" 文件到同一目录下
http://wiki.freetextbox.com/default.aspx/FreeTextBoxWiki.ImageGallery
3) FreeTextBox 属性设置
ImageGalleryPath = "~/image/upload" 上传默认路径
ImageGalleryUrl = "ftb.imagegallery.aspx?rif={0}&cif={0}" ftb.imagegallery.aspx的目录, 只能用相对目录,不可以用"~"
4) ImageGallery 的设置
ftb.imagegallery.aspx文件里
<FTB:ImageGallery id="ImageGallery1"
JavaScriptLocation="InternalResource"
UtilityImagesLocation="InternalResource"
SupportFolder="~/aspnet_client/FreeTextBox/"
AllowImageDelete=true AllowImageUpload=true AllowDirectoryCreate=false AllowDirectoryDelete=false runat="Server" />
AllowDirectoryCreate - 能否建立文件夹
AllowDirectoryDelete - 能否删除文件夹
AllowImageUpload - 能否上传图片
AllowImageDelete - 能否删除图片
AcceptedFileTypes - 可以上传文件扩展名的数组(array)
为开发者提供的2个属性
CurrentDirectories - a string[] array of directories to allow the user to navigate toward
CurrentImages - a FileInfo[] array of files the user should be able to insert.
- FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- 转: FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox 使用详解
- [转]FreeTextBox使用详解
- FreeTextBox使用详解
- FreeTextBox使用详解
- ASP2.0-FreeTextBox使用详解
- FreeTextBox使用详解 (版本3.1.1)
- FreeTextBox使用详解(FTBv3-1-6)
- FreeTextBox使用详解 (版本3.1.1)
- FreeTextBox(版本3.1.1) 使用详解
- 动态生成表格
- 最新版FreeTextBox(版本3.1.6)在ASP.Net 2.0中使用简解
- MyEclipse启动jre和工程jre冲突的解决方法
- 关于RuntimeException
- yield方法和join方法
- FreeTextBox使用详解
- Asp.net连接SQL Server2000数据库例程详解:
- 如何调用输入法,得到汉字的拼音
- Seven JavaScript Techniques You Should Be Using Today
- SQL安装挂起,解决方法
- SQL SERVER数据库开发之存储过程应用
- c++学习杂记(4)
- 数据字典的基本原理如何?
- 梦想中体会快乐