http://www.cnblogs.com/kflwz/articles/1337310.html
 
1。下载最新版FreeTextBox(版本3.1.6),解压   FreeTextBox 3.1.6 (2006/07/18)
  本地下载: http://www.51aspx.com/CV/OGOWR0LUYU096/
  作者网站下载地址:http://freetextbox.com/download/   
  详细版本有哪些改进和修改历史可以看这里:
  http://freetextbox.com/download/changelog.aspxFreeTextBox 3.1.6 (2006/07/18)
  * BUG: Firefox postback problems (due to IE specific code)
  * CHANGE: createlink now requires text to be selected    * BUG: FontSizesMenuList now functions correctly    * BUG: IE users would see the tag path of the entire document    * BUG: WordClean fix for <b> tags    * BUG: bug in FF vs. IE DOM handling of extra \n tag   Free版本的收费版本的区别可以看这里:http://freetextbox.com/features/
  2。打开ASP.Net2.0项目,添加引用。(如果添加过以前版本的FreeTextBox,先删除以前版本的引用)
  2.1。拷贝ftb.imagegallery.aspx到你要使用FreeTextBox的目录(当然可以是其他,但是可能要设置路径)
  3。将FreeTextBox添加到工具栏。(工具栏〉常规〉选择项〉浏览到DLL文件,添加)
  4。可以将工具栏上的控件拖入到你的页面了
 

<FTB:FreeTextBox ID="Free1"
  ImageGalleryPath="~/ImageAdmin"
runat="server" Text=`<%# Bind("Contents") %>`
ButtonDownImage="True"
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>

  4.1。修改ImageGalleryPath属性为你图片的放置目录。

  5。Q&A5.1。Q:怎么不能新建目录,上传文件等?
  A:修改ftb.imagegallery.aspx页面可以做到

<FTB:ImageGallery id="ImageGallery1"
SupportFolder="~/aspnet_client/FreeTextBox/" AllowImageDelete="true" AllowImageUpload="true"
AllowDirectoryCreate="true" AllowDirectoryDelete="true" runat="Server" />
  修改AllowImageDelete等属性5.2。Q:怎么没有看到“从图片库插入图片”这个图标?
  A:修改<FTB:FreeTextBox />的ToolbarLayout属性,添加一个InsertImageFromGallery,上面代码的例子就是已经添加好的。
  5.3。Q:按钮怎么是英文提示?
  A:<FTB:FreeTextBox />有个属性叫做Language,把默认的en-US改称zh-CN吧,就是中文简体了,听说这个版本带了25种语言呢。
==========================================================

FreeTextBox使用详解 (3.1.1版本使用)

Author: Annerose     Date:12/16/2005

版本: 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加入如下代码

1<?xml version="1.0" encoding="utf-8" ?>
2  <configuration>
3   <system.web>
4    <httpHandlers>
5     <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" />
6    </httpHandlers>
7   <system.web>
8 <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) 得到保存编辑的内容

 1 private void InitializeComponent()
 2 {    
 3     //    指向同一个委托
 4     this.FreeTextBox1.SaveClick += new System.EventHandler this.FreeTextBox1_SaveClick);
 5     this.Button1.Click += new System.EventHandler(this.FreeTextBox1_SaveClick);
 6 }
 7 
 8 private void FreeTextBox1_SaveClick(object sender, System.EventArgs e)
 9 {
10     divshow.InnerHtml = FreeTextBox1.Text;
11 }

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.

建议: 删掉Page_Load事件可以显著回避上传图片不能即时显示的问题. 不要重写Page_Load

=========================================================

Freetextbox是一个免费的.net msHTML 编辑器。
这里所用的是免费的freetextbox版本是中文版本1.6.3的汉化的freetextbox。
获得的地址。http://www.51aspx.com/CV/M67HNQANDQU37下载之后仔细看看其中的说明,你就可以使用这个完美的编辑器。
其中示例是在内联代码方式下,如果在代码后置下使用Freetextbox 呢。
1、首先我们把 FreeTextBox.dll 文件copy到我们的项目中的bin目录里。
然后在我们的项目里添加新的引用,在添加引用对话框选择项目标签,浏览/选择你的FreeTextBox.dll/打开/确定。应用就添加完成了。

2、如何获得FreeTextBox.dll 中所使用到的名字空间,本中文版本1.6.3 有3个名字空间。

using FreeTextBoxControls;
using FreeTextBoxControls.Design;
using FreeTextBoxControls.Common;

可以在引用的FreeTextBox.dll 查看对象浏览。
点开树型目录就可以清晰的看到,上面所说的名字空间了。
其他的版本类似可以获得。

3、在ASPx文件添加freetextbox
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
具体的方法和内联一样的。
同时cs文件中会有如下代码:

protected FreeTextBoxControls.FreeTextBox FreeTextBox1;产生
添加完后,运行一下就可以看到结果了。
在设计模式下我们还可以查看FreeTextBox 属性。
4、如何把FreeTextBox 内容写到数据库,我们在ASPx文件中添加一个bottom
其的onclick=“my_add"
cs文件

protected void my_add(object sender, System.EventArgs e)
 {
 // 在此处放置用户代码以初始化页面
 Response.Write(FreeTextBox1.Text);
 }

此处是输出内容,可以改成我们需要方法。

例子:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FreeTextBox.aspx.cs" Inherits="FreeTextBox" %>
<%@ Register ValidateRequest="false" TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=http://www.w3.org/1999/xhtml >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<FTB:FreeTextBox id="FreeTextBox1" runat="server" ButtonPath="http://localhost:2131/nettest/images/ftb/office2003/"/>
</div>
</form>
</body>
</html>

说明:这里的ButtonPath如果没有设置好可能出现很多图片无法显示的情况!ValidateRequest="false"也是必须的,要不页面不允许传输带有HTML标记的参数!

最新版FreeTextBox(版本3.1.6)在ASP.Net 2.0中使用简介的更多相关文章

  1. 第30月第11天 Xcode 9.0中新增的API版本检查@available

    1.Xcode 9.0中新增的API版本检查@available https://www.jianshu.com/p/0a94baa6c3dd https://www.jianshu.com/p/b8 ...

  2. 注册asp.net 4.0版本到IIS服务器中

    在IIS服务器的运维的过程中,有时候部署asp.net网站发现未安装.net framework对应版本信息,此时就需要重新将.net framework对应的版本注册到IIS中,此处以重新注册.ne ...

  3. 【vue-waring】element UI 由版本1.4.12 升级到element-ui@2.0.10

    遇到的问题:element UI   由版本1.4.12 升级到element-ui@2.0.10    cnpm run dev 运行后的waring 状态:解决(相关资料的方法对我没什么用) 解决 ...

  4. ASP.NET Web API中实现版本的几种方式

    在ASP.NET Web API中,当我们的API发生改变,就涉及到版本问题了.如何实现API的版本呢? 1.通过路由设置版本 最简单的一种方式是通过路由设置,不同的路由,不同的版本,不同的contr ...

  5. 报错:此版本的SQL Server Data Tools与此计算机中安装的数据库运行时组件不兼容

    在Visual Studio 2012中使用Entity Framework,根据模型生成数据库时,报如下错误: 无法在自定义编辑器中打开Transact-SQL文件此版本的SQL Server Da ...

  6. 不同版本(2.3,2.4,2.5,3.0)的Servlet web.xml 头信息

    不同版本(2.3,2.4,2.5,3.0)的Servlet web.xml 头信息 学习了:https://blog.csdn.net/z69183787/article/details/360080 ...

  7. DI 依赖注入之unity的MVC版本使用Microsoft.Practices.Unity1.2与2.0版本对比

    DI 依赖注入之unity的MVC版本使用Microsoft.Practices.Unity1.2与2.0版本对比 参考:https://www.cnblogs.com/xishuai/p/36702 ...

  8. MySQL技术专题(X)该换换你的数据库版本了,让我们一同迎接8.0的到来哦!(初探篇)

    前提背景 MySQL关是一种关系数据库管理系统,所使用的 SQL 语言是用于访问数据库的最常用的标准化语言,其特点为体积小.速度快.总体拥有成本低,尤其是开放源码这一特点,在 Web应用方面 MySQ ...

  9. Chrome54安装最新版Flash版本办法

    从 Chrome54 版本开始,flash默认已经不能使用了.打开机器上的C:\Users\Administrator\AppData\Local\Google\Chrome\User Data\Pe ...

随机推荐

  1. ThinkPHP3.2 加载过程(二)

    回顾: 上次介绍了 ThinkPHP 的 Index.PHP入口文件.但只是TP的入口前面的入口(刷boss总是要过好几关才能让你看到 ,不然boss都没面子啊),从Index.PHP最后一行把我们引 ...

  2. 动态linq表达式新方法,Dynamic LINQ Extension Method

    Remember those old posts on Dynamic LINQ? You are probably aware that Microsoft has made its impleme ...

  3. sql语句分组统计出年月日下数据记录数目

    把时间设置date类型,其中 select count(*),year(b.date),month(b.date) ,day(b.date) from person as b group by yea ...

  4. JAVASCRIPT实现翻页保存已勾选的项目

    <input type="checkbox" name="a" value="1" /><br/> <inpu ...

  5. 字符串做异或使用union

    #include <stdio.h> #include <sys/time.h> #include <string.h> union data { unsigned ...

  6. OFBIZ bug_ControlServlet.java:239:ERROR

    错误日志: [java] 2014-09-23 00:11:34,877 (http-bio-0.0.0.0-8080-exec-4) [ ControlServlet.java:141:INFO ] ...

  7. PHP 对数组数值进行排序,使用另一个容器

    <?php /* 排序方式::事实上只需要将要循环的数组进行N次循环,然后每次取最大的一个值*/ $array = array(100,25,10,258,33,48,10,5,13,58,33 ...

  8. PHP - PDO 之 mysql 基础操作

    <?php /* pdo 学习 */ $dsn = 'mysql:host=localhost;dbname=cswl';//构建连接dsn $db = new pdo($dsn,'root', ...

  9. [ 转载]JAVA Socket超时浅析

    JAVA Socket超时浅析 转载自 http://blog.csdn.net/sureyonder/article/details/5633647 套接字或插座(socket)是一种软件形 式的抽 ...

  10. 关于count(1) 和 count(*)

    Q:What is the difference between count(1) and count(*) in a sql queryeg.select count(1) from emp; an ...