ASP.NET下解决FCKEditor在AJAX中取值问题
来源:互联网 发布:网吧局域网网络拓扑图 编辑:程序博客网 时间:2024/06/06 10:43
以下是aspx和对应的cs代码:
<%@ Page Language="C#" ValidateRequest="false" EnableEventValidation="false" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
<script>
function getString()
{
$get("hf_FCKEditor1").value=FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML(true);
return true;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<script>
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/FCKeditor/";
oFCKeditor.Create();
</script>
<asp:UpdatePanel id="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" UseSubmitBehavior="False"
OnClientClick="getString()" />
<br />
<asp:TextBox ID="TextBox1" runat="server" Height="466px" TextMode="MultiLine" Width="594px">
</asp:TextBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:HiddenField ID="hf_FCKEditor1" runat="server" />
</form>
</body>
</html>
////////////////////////////////////////////////////
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = hf_FCKEditor1.Value;
}
}
- ASP.NET下解决FCKEditor在AJAX中取值问题
- FCKeditor在ASP.NET下出现的问题及解决方案
- FCKeditor在asp.net 下的配置
- FCKeditor在ASP.NET AJAX的UpdatePanel控件中按钮回调后内容丢失的问题
- 在ASP.NET下FCKeditor的部署笔记
- FCKEditor在Asp.net环境下的配置安装
- FCKEditor在Asp.net环境下的配置安装
- 在asp.net下快速配置FCKEditor 2.5
- 解决asp.net ajax updatepanel 乱码问题
- 解决ASP.NET AJAX在frame及iframe中跨域访问的问题
- 解决在asp.net中 使用 ajax UpdatePanel出现乱码问题的解决方案
- asp.net下FCKeditor的安全问题
- asp.net下FCKeditor的安全问题
- asp.net下FCKeditor的安全问题
- ASP.net下配置FCKeditor控件
- Asp.net下 FCKEditor 配置详解
- 在ASP.Net中使用FCKeditor
- FCKEditor在Asp.net的安装
- Ajax中使用Response.Write输出javascript脚本出错的解决方案
- 关于正则表达式的使用
- 手动生成MyEclipse注册码及序列号
- AJAX&.NET下在母版页中使用UpdatePanel的解决方案
- (2010-07-17)Oracle 中 scott用户的表
- ASP.NET下解决FCKEditor在AJAX中取值问题
- Problem A 网络流邻接表
- 潜规则-吴思
- FckEditor中文(ASP.NET)配置手册详细说明
- Ajax简介
- 在母版页中使用UpdatePanel
- 瞎写
- 保存图片时出现"800700de错误"的解决方案
- C# Excel数据导出