FreetextBox3.1.6使用帮助

FreetextBox3.1.6使用帮助

当然,这样还不足够我们使用,最起码我们也应该能上传个图片啥的,默认情况下,FreeTextBox是没有这个按钮的,需要我们稍微的配置一下,就是在你刚刚引用FreeTextBox的地方,也就是

<form runat="server">

      <FTB:FreeTextBox

        ToolbarLayout="........"

        runat="Server" />

   </form>

看到了没,是不是多了个ToolbarLayout,你可以在这里填写:

ParagraphMenu, FontFacesMenu, FontSizesMenu, FontForeColorsMenu,

FontForeColorPicker, FontBackColorsMenu, FontBackColorPicker, Bold, Italic, Underline,

Strikethrough, Superscript, Subscript, InsertImageFromGallery, CreateLink, Unlink,

RemoveFormat, JustifyLeft, JustifyRight, JustifyCenter, JustifyFull, BulletedList,

NumberedList, Indent, Outdent, Cut, Copy, Paste, Delete, Undo, Redo, Print, Save,

ieSpellCheck, StyleMenu, SymbolsMenu, InsertHtmlMenu, InsertRule, InsertDate,

InsertTime, WordClean, InsertImage, InsertTable, EditTable, InsertTableRowBefore,

InsertTableRowAfter, DeleteTableRow, InsertTableColumnBefore, InsertTableColumnAfter,

DeleteTableColumn, InsertForm, InsertForm, InsertTextBox, InsertTextArea,

InsertRadioButton, InsertCheckBox, InsertDropDownList, InsertButton, InsertDiv,

InsertImageFromGallery, Preview, SelectAll, EditStyle

这么多种按钮,中间用可以用","(逗号)";"(分号)"|"(管道符)隔开,想知道有什么区别,嘿嘿,那就自己试吧...一般使用下面几个

        <FTB:FreeTextBox runat="server" 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" Language="zh-CN" BreakMode="LineBreak" >         </FTB:FreeTextBox>

言归正转,InsertImageFromGallery这个按钮是我们想要的,当我把ToolbarLayout="InsertImageFromGallery"的时候,就会出现一个图标,然后我们把ftb.imagegallery.aspx这个文件Copy到刚才建的Default.aspx同一级目录下,运行一下试试看,点击图标是不是弹出来一个页面,不要高兴太早,3.1.6的问题就出在ftb.imagegallery.aspx这个文件里

注意到没有:

     <form runat="server" enctype="multipart/form-data">  

    

   <FTB:ImageGallery

    JavaScriptLocation="ExternalFile"

    UtilityImagesLocation="ExternalFile"

    SupportFolder="~/aspnet_client/FreeTextBox/"

    AllowImageDelete=false AllowImageUpload=true AllowDirectoryCreate=false AllowDirectoryDelete=false runat="Server" />

  

</form>

这几行,有什么用?管他有什么用呢,反正所有的东西都在FreeTextBox.Dll里,嘿嘿,我猜这是为了给1.1用户用的

中间那三段代码,不删,不行,你肯定无法上传图片,我就是被这几行代码给害的,折腾了好几个小时....

在webconfig里面加入下面的代码

  <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>

另外在使用FreetextBox空间页面的html里面添加

<%@ Page language="c#"  ValidateRequest="false"%>

 客户端中检测到有潜在危险的 Request.Form 值 关闭

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值