我是在使用中悟的一点经验,只是操作步骤,
1)下载解压,
把Framework-2.0目录下的FreeTextBox.dll文件拷到搞项目的BIN文件夹中
把aspnet_client目录下FreeTextBox目录拷到项目中,
2)
在web.config加
<system.web>
<httpHandlers>
<!--
Please note, this is only for ASP.NET 1.0 and 1.1.
This line does not need to be included in ASP.NET 2.0
-->
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox"/>
</httpHandlers>
</system.web>
<httpHandlers>
<!--
Please note, this is only for ASP.NET 1.0 and 1.1.
This line does not need to be included in ASP.NET 2.0
-->
<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox"/>
</httpHandlers>
</system.web>
使用FreeTextBox
1) aspx页面顶上
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
2)调用和说明--- 拷贝 "ftb.imagegallery.aspx" 文件到同一目录下
<FTB:FreeTextBox id="FreeTextBox1" ToolbarStyleConfiguration="officeMac"///工具栏皮肤样式
Language="zh-CN" ////语言
ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell" ///工具栏所要显示的按钮
ImageGalleryPath = "~/image/upload"///上传图片路迳
ImageGalleryUrl = "ftb.imagegallery.aspx?rif={0}&cif={0}"
runat="Server" />
Language="zh-CN" ////语言
ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell" ///工具栏所要显示的按钮
ImageGalleryPath = "~/image/upload"///上传图片路迳
ImageGalleryUrl = "ftb.imagegallery.aspx?rif={0}&cif={0}"
runat="Server" />
3) 客户端中检测到有潜在危险的 Request.Form 值
<%@ Page language="c#" ValidateRequest="false"%>
3) ImageGallery 的设置
ftb.imagegallery.aspx文件里
<FTB:ImageGallery id="ImageGallery1"
JavaScriptLocation="ExternalFile"
UtilityImagesLocation="ExternalFile"
SupportFolder="~/FreeTextBox/"
AllowImageDelete="false" AllowImageUpload="true" AllowDirectoryCreate="true" AllowDirectoryDelete="true" runat="Server" />
AllowDirectoryCreate - 能否建立文件夹JavaScriptLocation="ExternalFile"
UtilityImagesLocation="ExternalFile"
SupportFolder="~/FreeTextBox/"
AllowImageDelete="false" AllowImageUpload="true" AllowDirectoryCreate="true" AllowDirectoryDelete="true" runat="Server" />
AllowDirectoryDelete - 能否删除文件夹
AllowImageUpload - 能否上传图片
AllowImageDelete - 能否删除图片
AcceptedFileTypes - 可以上传文件扩展名的数组(array)
我是根据博客园是前辈改写的,前辈写的Framework-1.0的,希望对新手有一些帮助
这个是测试的DOME加数据库的,有需要的话可以下 http//www.nfblog.cn/freeFTB.rar