the best solution that you can add the emotion function to freetextbox

原创 2007年09月20日 11:02:00
 
write before the text.
 
yesterday evening ,I put all my heart in writting my blog, but only with a little fault---I forgot to save the article before I had uploaded the article.Then, something wrong had happened in the brower,I lost my composition when I clicked the upload button.I did not want to rewrite that, but I thought the technology was quite good, so I decided I should redo it .Becauce I can improve my wriiten-Enlish. Now let us begin with "what is FreeTextBox?".
 
1.what is FreeTextBox
 
FreeTextBox is the most-used HTML editor for ASP.NET. It is compatible with IE on the PC, and Mozilla and Firefox on all platforms. It is used in major Open Source projects such as community server and DotNetNuke as well as excellent packages like Smarter mail.
 
2.how to use FreeTextBox
 
the first,you can download the "FreeTextBox" from http://freetextbox.com/download/ ,then decompressing files .
 
the second, you must choice the"FreeTextBox.dll"and add it to the toolbox,and then you can draw it from the toolbox.
 
3.how to add the emotion button to the FreeTextBox
 
follow me,you will find them easy!
 
first,you can build a web project, named it "emotion_test". after that you must copy the aspnet_client folder
 
which in the decompressing files to the project root directory and build a new folder named "qq" in the project
 
 root directory which used to fill with emotion pictures.
 
when you finish that, you can draw a FreeTextBox from toolbox to default.aspx. then jump to default.aspx.cs to coding.the source code is follow :
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        initTextBox();
 
    }
    public void initTextBox()
    {
        string myftb = "this.ftb";
        string temp = "";
        //QQface
        ToolbarButton bu4 = new ToolbarButton("插入QQ表情", "插入QQ表情", "QQ");
        temp = "window.showModalDialog('QQ.aspx'," + myftb +
            ",'status:no;dialogWidth:385px;dialogHeight:205px;edge:Raised; enter: no; help: No; resizable: No;')";
        bu4.ScriptBlock = temp;
        this.FreeTextBox1.Toolbars[1].Items.Add(bu4);
    }
}
you should remember that:you must add the using FreeTextBoxControls; before your coding.
 
if you complete the stages above,you run the project,you can see the picture followed:
 
the third, if you come to here,we can focus on QQ emotion. you should add a new item "web window" and named it "QQ.aspx" to your project.draw a DataList control to QQ.aspx, you must notice that: the DataList control should be HTML .right clicked the DataList control and choose the property item. then find the repeatcolumns and alter it to 15. it means that: the QQ emotional pictures will ranged 15 in a row. then right clicked the DataList control and choose the "show intelligent mark" item. then you choose the edit template item and add a picture control to the DataList control then end the template edit. after do that, we can clicked the "design"button which at the left corner of the bottom then the page would jump to the design page. and you can alter the HTML code at here. the HTML code is followed:
 
function ReturnValue(imgId)
{
 re= window.dialogArguments;
 re.InsertHtml("<img src='ftbface/"+imgId+"' border=0>");
 window.close();
}
 
this segment of javascript is add to the place between<head>and</head>.
then we also alter another places in the HTML code:
<div>
        <asp:DataList ID="DataList1" runat="server" RepeatColumns="15">
            <ItemTemplate>
               <div onclick="ReturnValue('<%# "qq/" +Eval("Name") %>')"><img src='<%# "qq/" +Eval("Name") %>''/></div>
            </ItemTemplate>
        </asp:DataList></div>
the last,we coding in the QQ.aspx.cs:
public partial class QQ : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BindList();
 
    }
    void BindList()
    {
        DirectoryInfo imagesfile = new DirectoryInfo(Server.MapPath(@"qq"));
        DataList1.DataSource = imagesfile.GetFiles("*.gif");
        DataList1.DataBind();
    }
    protected void dlstFace_ItemCommand(object source, DataListCommandEventArgs e)
    {
        Image imb = (Image)e.Item.FindControl("imgFace");
        imb.Attributes.Add("OnClick", "ReturnValue(" + imb.ImageUrl + ")");
    }
}
notice: you should add using System.IO; or you can not run your project correctly.if you do everything well, you can see the effect followed:
 

USACO Superprime Rib

Superprime Rib Butchering Farmer John's cows always yields the best prime rib. You can tell pri...
  • u012797220
  • u012797220
  • 2014年02月02日 16:34
  • 1185

mongoTemplate异常之 you can't add a second 'null' criteria.

错误代码:Query query = new Query(); Criteria c = new Criteria(); c.andOperator(new Criteria("name").is('...
  • zt_fucker
  • zt_fucker
  • 2017年11月30日 19:20
  • 128

Be the best 'you‘ that you can

Once you've identifited what makes you unique,commit yourself to be the best that you can be.The mor...
  • xuemoyao
  • xuemoyao
  • 2012年11月23日 08:26
  • 738

mongodb you can't add a second 问题

问题信息: Due to limitations of the com.mongodb.BasicDBObject, you can't add a second 'createTime' expre...
  • xiao_287130
  • xiao_287130
  • 2016年07月19日 11:35
  • 347

You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.  You ...
  • jesse881025
  • jesse881025
  • 2016年11月30日 18:14
  • 1865

遇到的问题-----you can't add a second 'treePath' criteria. Query already contains

当我们在java中使用mongo的spring接口进行查询时,如果需要对同一个字段  有两个限制条件,使用不当是则会报错: 例如 如下用法: Criteria.where("treePat...
  • q383965374
  • q383965374
  • 2015年12月17日 16:29
  • 2082

can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId

can’t get git rev, you should add git to system path or just input test value, such as ‘testTinkerId...
  • gyh790005156
  • gyh790005156
  • 2016年10月12日 14:25
  • 3011

一.Gradle的介绍和安装

一.Gradle介绍   一个开源的项目自动化构建工具,建立在Apache Ant和Apache Maven概念的基础上,并引入了基于Groovy的特定领域语言(DSL),而不在使用XML形式管理构...
  • Tiglle
  • Tiglle
  • 2017年07月21日 23:23
  • 104

121. Best Time to Buy and Sell Stock [easy] (Python)

题目链接https://leetcode.com/problems/best-time-to-buy-and-sell-stock/题目原文 Say you have an array for w...
  • coder_orz
  • coder_orz
  • 2016年05月28日 01:02
  • 980

CocoaPods解决Unable to add a source with url ...

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.  You ...
  • nyh1006
  • nyh1006
  • 2016年05月09日 20:28
  • 6277
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:the best solution that you can add the emotion function to freetextbox
举报原因:
原因补充:

(最多只允许输入30个字)