`

FreeTextBox 4.0 版控件的使用方法及下载_倾颜戏羽

阅读更多

FreeTextBox是一个免费的、广泛应用于Asp.Net的新闻发布系统和博客中的一个控件;freeTextBox类似于微软的RTF控件。可以设置字体、颜色、插入图片、建立超级链接、插入表格等操作,功能十分强大。到目前我发现最新的版本为4.0 beta1版,使用方法也比较简单。

一、下载FreeTextBox文件。(单击这里下载

二、解压后,把【Asp.Net】文件夹中的【2.0】文件夹里面的Refresh.Web.FreeTextBox.dll文件复制到你站点中的【Bin】文件夹里。复制【Refresh_Web】文件夹到你的站点根目录下。

三、添加引用

在Vs2005的解决方案窗口中单击右键,选择“添加引用”命令,在弹出的对话框中单击浏览选项卡,找到站点文件夹中Bin里面的Refresh.Web.FreeTextBox.dll文件,单击确定。

把Refresh.Web.FreeTextBox.dll动链文件直接拖动到工具栏的“常规”选项卡中,这时在常规选项卡里会出现三个按钮:ToolBar、floatie和FreeTextBox。

三、新建一个页面Default.Aspx,把FreeTextBox拖放到页面中。

四、设置FreeTextBox控件的工具栏,切换页面至源代码视图。

FTB:FreeTextBox id="FreeTextBox1" runat="SErver" Width="900px" Height="500px" Theme="office12"     IsFullDocument="true"> 在这段代码后面插入下列代码,用来设置显示的工具栏按钮。
         <FTB:ToolbarGroup Title="Font" >
              <FTB:ToolbarItem Name="ParagraphMenu" />
              <FTB:ToolbarItem Name="FontFacesList" />
              <FTB:ToolbarItem Name="FontSizesList" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="Bold" />
              <FTB:ToolbarItem Name="Italic" />
              <FTB:ToolbarItem Name="Underline" />
              <FTB:ToolbarItem Name="Strikethrough" />
              <FTB:ToolbarItem Name="separator" />
              <FTB:ToolbarItem Name="Superscript" />
              <FTB:ToolbarItem Name="Subscript" />
              <FTB:ToolbarItem Name="separator" />
              <FTB:ToolbarItem Name="FontForeColorPicker" />
              <FTB:ToolbarItem Name="FontBackColorPicker" />
         </FTB:ToolbarGroup>
         <FTB:ToolbarGroup Title="Format">
              <FTB:ToolbarItem Name="BulletedList" />
              <FTB:ToolbarItem Name="NumberedList" />
              <FTB:ToolbarItem Name="Indent" />
              <FTB:ToolbarItem Name="Outdent" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="JustifyLeft" />
              <FTB:ToolbarItem Name="JustifyRight" />
              <FTB:ToolbarItem Name="JustifyCenter" />
           <FTB:ToolbarItem Name="JustifyFull" />
         </FTB:ToolbarGroup>
         <FTB:ToolbarGroup Title="Edit">
              <FTB:ToolbarItem Name="Cut" />
              <FTB:ToolbarItem Name="Copy" />
              <FTB:ToolbarItem Name="Paste" />
              <FTB:ToolbarItem Name="PasteFromWord" />
              <FTB:ToolbarItem Name="PasteCode" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="Undo" />
              <FTB:ToolbarItem Name="Redo" />  
              <FTB:ToolbarItem Name="Print" />
              <FTB:ToolbarItem Name="Save" />
              <FTB:ToolbarItem Name="Clear" />
         </FTB:ToolbarGroup>
         <FTB:ToolbarGroup Title="Table">
              <FTB:ToolbarItem Name="InsertTable" />
              <FTB:ToolbarItem Name="InsertTableColumnBefore" />
              <FTB:ToolbarItem Name="InsertTableColumnAfter" />
              <FTB:ToolbarItem Name="InsertTableRowBefore" />
              <FTB:ToolbarItem Name="InsertTableRowAfter" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="DeleteTableColumn" />
              <FTB:ToolbarItem Name="DeleteTableRow" />
              <FTB:ToolbarItem Name="MergeCells" />
              <FTB:ToolbarItem Name="SplitCell" />
         </FTB:ToolbarGroup>
         <FTB:ToolbarGroup Title="CSS">
              <FTB:ToolbarItem Name="CssClass" />
              <FTB:ToolbarItem Name="EditCssProperties" />
              <FTB:ToolbarItem Name="WordClean" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="CssClassList" >
                   <FTB:ToolbarListItem Text="<span class='sampleClass'>Sample Class</span>" Value="sampleClass" />
              </FTB:ToolbarItem>
         </FTB:ToolbarGroup>
         <FTB:ToolbarGroup Title="Insert">
              <FTB:ToolbarItem Name="InsertRule" />
              <FTB:ToolbarItem Name="InsertImage" />
              <FTB:ToolbarItem Name="CreateLink" />
              <FTB:ToolbarItem Name="Unlink" />
              <FTB:ToolbarItem Name="break" />
              <FTB:ToolbarItem Name="InsertHtmlMenu">
                   <FTB:ToolbarListItem Value="<b>some bold text</b>" Text="<b>bold text</b>" />                   <FTB:ToolbarListItem Value="<b>some italic text</b>" Text="<i>italic text</i>" />              </FTB:ToolbarItem>
         </FTB:ToolbarGroup>
</FTB:FreeTextBox>(这句不用输入)
<FTB:Floatie
ID="Floatie1" TargetEditor="FreeTextBox1" runat="SErver">
     <FTB:ToolbarGroup >
         <FTB:ToolbarItem Name="ParagraphMenu" />
         <FTB:ToolbarItem Name="BulletedList" />
         <FTB:ToolbarItem Name="NumberedList" />
         <FTB:ToolbarItem Name="break" />
         <FTB:ToolbarItem Name="CreateLink" />
         <FTB:ToolbarItem Name="Bold" />
         <FTB:ToolbarItem Name="Italic" />
         <FTB:ToolbarItem Name="Underline" />
         <FTB:ToolbarItem Name="Strikethrough" />
         <FTB:ToolbarItem Name="separator" />
         <FTB:ToolbarItem Name="Superscript" />
         <FTB:ToolbarItem Name="Subscript" />
     </FTB:ToolbarGroup>Bold 加粗
BulletedList 项目符号
Copy 复制
CreateLink 插入链接
Cut   剪切
Delete 删除
DeleteTableColumn 删除一列(En)
DeleteTableRow 删除一行(En)
IeSpellCheck IE拼写检查(En 需要安装拼写检查软件)
Indent 增加缩进
InsertDate 插入日期
InsertImage 插入图片
InsertRule 插入水平线(En)
InsertTable 插入表格(En)
InsertTableColumnAfter 插入表格列在后面(En)
InsertTableColumnBefore 插入表格列在前面(En)
InsertTableRowAfter 插入表格行在后面(En)
InsertTableRowBefore 插入表格行在前面(En)
InsertTime 插入时间
Italic 斜体
JustifyCenter 居中
JustifyFull 两端对齐
JustifyLeft 左对齐
JustifyRight 右对齐
NetSpell 网络拼写检查(En)
NumberedList 编号
Outdent 减少缩进
Paste 粘贴
Print 打印
Redo 重复
RemoveFormat 删除所有格式
Save 保存(En)
StrikeThrough 删除线
SubScript 下标
SuperScript 上标
Underline 下划线
Undo 撤消
Unlink 删除链接

</FTB:Floatie>

下面是工具栏按钮的具体解释:

 

五、将输入的结果存储到数据库中

创建Sql Server数据库表 NEWS,其中包括一个Neirong字段nText类型。

在页面上添加一个命令按钮,命名为【提交】。在【提交】按钮的单击事件中添加代码。

添加引用:Using System.Data.SqlClient;

protected void Button1_Click(object sender, EventArgs e)//【提交按钮】
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
        SqlCommand com = new SqlCommand("Insert into News(neirong) values(@neirong)", con);
        con.Open();
        com.Parameters.AddWithValue("@neirong", FreeTextBox1.Text);
        com.ExecuteNonQuery();
        con.Close();
    }

六、显示Neirong字段中的内容

新建一个页面,添加一个Label1标签,在Load事件中添加读取数据库信息的代码

Using System.Data.SqlClient;

protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection con=new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString);
        SqlCommand com=new SqlCommand("select neirong from news where id=1",con);
        con.Open();
        SqlDataReader dr=com.ExecuteReader();
        if (dr.Read())
        {
              Label1.Text = dr["neirong"].ToString();
        }
        con.Close();
   }
这样就能够显示出在FreeTextBox控件中输入的内容。

分享到:
评论

相关推荐

    FreeTextBox 4.0 富文本控件

    FreeTextBox 4.0 富文本控件

    freetextbox4.0

    freetextbox4.0 最新版本的控件.可以自动换行...

    FreeTextBox 4.0

    ASP.NET 2.0 下FreeTextBox控件,支持Web2.0

    .net文版编辑器(FreeTextBox4.0)

    界面美观的FreeTextBox文本编辑器,简单好用

    FreeTextBox4.0

    解压后 在工具箱的选项卡中点击选择项 然后浏览 加入Refresh.Web.FreeTextBox.dll文件即可

    FreeTextBox FckEditor

    这是ASP中常用的FreeTextBox控件与FCKEditor控件的完整版本,包括FreeTextBox3.2、FreeTextBox4.0与FCKEditor2.6,希望对大家有用.

    最新FreeTextBook控件

    FreeTextBox是一个免费的、广泛应用于Asp.Net的新闻发布系统和博客中的一个控件;freeTextBox类似于微软的RTF控件。可以设置字体、颜色、插入图片、建立...到目前我发现最新的版本为4.0 beta1版,使用方法也比较简单。

    asp.net开发必备控件,AjaxControlToolkit.dll,ASPAJAXExtSetup.msi

    其中包括了ASPAJAXExtSetup.msi以及扩展工具包AjaxControlToolKit,另外里面还有一个最新的My97DatePicker最新版本4.0以及asp.net第三方控件FreeTextBox.dll和WebValidates.dll等,相当实惠的一个资源包

    asp.net 富文本框

    多种风格选择的一个asp.net控件 对应不同版本 2.0 3.5 4.0

    ASP.NET3.5典型模块开发源代码

    6.4.1 FreeTextBox编辑器 74 6.4.2 FCKEditor在线编辑器 76 6.5 小结 79 第7章 在线支付模块 80 7.1 在线支付介绍 80 7.1.1 在线支付的安全保障 80 7.1.2 在线支付的优点 80 7.2 在线支付的流程 81 ...

Global site tag (gtag.js) - Google Analytics