how to use FCKeditor in ASP.NET 2.0??

J

Jeff

Hey

ASP.NET 2.0

lets say I have a web page containing a FCKeditor, when this page loads it
will fill the FCKeditor with some kind of text... I'm wondering how to set
this text in the FCKeditor?

I'm also wondering how to get the text entered in the FCKedtior. I've tryed
putting a button on the web page, in the event handler I've placed a script
below. But this script don't get teh value in the FCKeditor the string
variable "test" don't get the value of the FCKeditor, it gets the value
"FredCK.FCKeditorV2.FCKeditor"

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
string test = FCKeditor1.ToString();
}
}

This is the markup of the page I'm having problems with using FCKeditor:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" ValidateRequest="false" %>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2"
Assembly="FredCK.FCKeditorV2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<FCKeditorV2:FCKeditor id="FCKeditor1" BasePath="~/FCKeditor/"
runat="server" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Button" /></div>
</form>
</body>
</html>

Any suggestions?
 
J

Justin Kadima

FredCK.FCKeditorV2.FCKeditor youreditor= new
FredCK.FCKeditorV2.FCKeditor();

and then in order to get it' value in our code use:

String thevalue=youreditor.Value;
 
J

Jeff

thanks!


Justin Kadima said:
FredCK.FCKeditorV2.FCKeditor youreditor= new
FredCK.FCKeditorV2.FCKeditor();

and then in order to get it' value in our code use:

String thevalue=youreditor.Value;
 
M

Mark Fitzpatrick

Keep something in mind, this may not work with Vista. The FCKeditor relies
(at least when I used it) on an html editing control that came with windows.
Vista won't be including that control as part of the OS so users on Vista
won't see the editing area.
 
J

Justin Kadima

That's a bad news :(


Mark Fitzpatrick said:
Keep something in mind, this may not work with Vista. The FCKeditor relies
(at least when I used it) on an html editing control that came with
windows. Vista won't be including that control as part of the OS so users
on Vista won't see the editing area.
 
Joined
Aug 28, 2008
Messages
19
Reaction score
0
Excellent article showing you how to use it here:
w w w.itjungles.com/dropdownlist/how-to-use-fckeditor-in-asp-net-2-0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top