asp.net FreeTextBox 使用 和 未能映射路径“/aspnet_client/FreeTextBox/Languages/en-US.xml”

FreeTextBox控件 是一种富文本控件,也就是在线文本编辑控件,可以像Word编辑器那样对录入的内容设置样式,排版等,而不用编写HTML代码。

百度百科FreeTextBox简介
FreeTextBox官网

下载FreeTextBox.dll

在Microsoft Visual Studio 2010 添加FreeTexBox控件到工具箱

步骤:

工具-->选择工具箱项-->浏览-->找到FreeTextBox.dll-->打开-->确定

这时工具箱就会出现FreeTextBox这个控件,拖拽一个FreeTextBox控件,运行一下会报错

未能映射路径“/aspnet_client/FreeTextBox/Languages/en-US.xml”

解决办法如下:

<FTB:FreeTextBox ID="Free1" ImageGalleryPath="~/Files" Language="zh-CN" runat="server" ButtonDownImage="True" SupportFolder="~/aspnet_client/FreeTextBox/" ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu|Bold,Italic,Underline,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage,InsertImageFromGallery,InsertRule|Cut,Copy,Paste;Undo,Redo,Print">
</FTB:FreeTextBox>

其中SupportFolder="~/aspnet_client/FreeTextBox/" 这个是关键,否则会出现未能映射路径“/aspnet_client/FreeTextBox/Languages/en-US.xml” 这个错误。启动页面运行正常.

FreeTextBox 属性设置
ImageGalleryPath = "~/Files"  上传默认路径
ImageGalleryUrl = "ftb.imagegallery.aspx?rif={0}&cif={0}"  ftb.imagegallery.aspx的目录, 只能用相对目录,不可以用"~"
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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值