• FreeTextBox使用方法


    很久就听说FreeTextBox不错,就下载了来用了下,发现网上介绍的文档少的可怜。在参考了前人的文档以后写点详细的文档出来,废话少说,到http://www.freetextbox.com/网站上,都是英文,没事,不用管它,点Download,里面有个
    • Download Control (3.1.6) (zip)

      点击就可以了,下完以后是个压缩文件,解压开来,有这几个主要文件:

      aspnet_client          FreeTextBox的外观文件,直接拷贝到你的工程的目录下就可以了。

      Docs                        文档嘛,就是说明文档,只有一个帮助文件

      examples              这是人家官方调试好的例子

      Framework-2.0     适合.net freameork2.0使用的dll(命名空间)

      Framework-1.0     适合.net freameork1.1使用的dll(命名空间)

      Framework-1.0     适合.net freameork1.0使用的dll(命名空间)

       只要把Framework-2.0/Framework-1.1/Framework-1.0三个中适合你用的那个dll拷贝到你工程下的bin目录下,将

      aspnet_client 拷贝到工程下,然后你可以随便的调试任何一个例子都很容易通过的。我只调试了一个,其他的也没

      有什么问题的,有问题的发邮件给我吧xingyaocc@163.com

      哦还有命名空间是FreeTextBoxControls

    • 下面的是我调试的一个例子,大家可以参考下。为了方面,把代码和HTML写到一起了。     //ToolbarStyleConfiguration="officeMAC"              是我为了方便,而没有删除,如果不删除,就会有相应的风格出现,在aspnet_client 有的,大家如果不需要那么多风格也可以删除掉对应的文件夹以节省空间。

    • <%@ Page Language="C#" ValidateRequest=false %>
      <%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
      <%@Import Namespace="System.Data" %>
      <%@Import Namespace="System.Data.OleDb" %>

    • <script runat="server">

    • protected void Page_Load(Object Src, EventArgs E) 
      {
       if (!IsPostBack)
          {
        FreeTextBox1.Text = "";
       }
      }

    • protected void SaveButton_Click(Object Src, EventArgs E)
      {
          FreeTextBox1.ImageGalleryPath = "images";
       Output.Text = FreeTextBox1.Text;
          
         

    •     string MyConnString="Provider=Microsoft.Jet.OleDb.4.0;Data Source="+Server.MapPath(".")+".//data//db1.mdb;";
       OleDbConnection MyConn=new OleDbConnection(MyConnString);
       MyConn.Open();
          OleDbCommand myCmd = new OleDbCommand("insert into db1(content) values('" + FreeTextBox1.Text + "')", MyConn);
          myCmd.ExecuteNonQuery();
          MyConn.Close();
      }


    • </script>
      <html>
      <head>
       <title>Default Setup</title>
      </head>
      <body>

    •     <form id="Form1" runat="server">
           
           <h2>Default Example</h2>
           
           <div>
           //ToolbarStyleConfiguration="officeMAC"              
         <FTB:FreeTextBox id="FreeTextBox1" Focus="true"
                  SupportFolder="~/aspnet_client/FreeTextBox/"
                  JavaScriptLocation="ExternalFile" 
                  ButtonImagesLocation="ExternalFile"
                  ToolbarImagesLocation="ExternalFile"
               
                  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"
                  runat="Server"
                  GutterBackColor=""
                  DesignModeCss="designmode.css"    
          OnSaveClick="SaveButton_Click" 
          runat="Server" Text="<b>asdfds</b>" Width="600px" />
         <asp:Button id="SaveButton" Text="Save" onclick="SaveButton_Click" runat="server" />
        </div>
        
        <div>
         <asp:Literal id="Output" runat="server" />
        </div>
       </form>
      </body>
      </html>

  • 相关阅读:
    MongoDB,无模式文档型数据库简介
    数据说话:怎样的程序员最抢手?
    猛醒:也许我们一生追求的都错了!
    中国风电生产监控平台界面
    如何跟着趋势去赚钱
    2015年最好的员工心态培养 -- 我们需要把简单的事情做到极致
    什么是程序员的核心竞争力?
    第一篇 技术选型
    .net core 读取配置文件
    .net core nlog记录日志
  • 原文地址:https://www.cnblogs.com/niaowo/p/2847346.html
Copyright © 2020-2023  润新知