使用页脚模板添加新行,使用带有cleditor的textarea作为输入

时间:2012-09-25 17:37:31

标签: c# asp.net .net gridview

我正在使用footertemplate在gridview中添加新行。在footertemplate我有html textarea与cleditor绑定。一旦我在textarea中输入文本并输入添加按钮,那么输入的文本就会被清除。

1 个答案:

答案 0 :(得分:0)

你需要使用asp文本框而不是textarea

用这样的东西改变你的html textarea

<asp:TextBox id="input" runat="server" TextMode="MultiLine" Text=""></asp:TextBox>

**不要忘记TextMode =“MultiLine”

你的承诺声明应该是这样的

$(document).ready(function() {
    $('#<%= input.ClientId %>').cleditor({width:500, height:180, useCSS:true});
});