This is a migrated thread and some comments may be shown as answers.

problem with radeditor.content

2 Answers 82 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sadiqabbas
Top achievements
Rank 1
sadiqabbas asked on 31 Jan 2010, 07:10 AM
hi all
i create project with using radeditor 2008 q3 (2008.3.1314.20)
i am using access database
example below
page load
{
     dataset ds = c1.getaccessdata("select data from raddata where pageid='temp';");
     RadEditor1.Content = ds.Tables[0].Rows[0].ItemArray[0].ToString();
     ds.clear();
}
protected void Button1_Click(object sender, EventArgs e)
    {
        string radvalue = con.correctstr(RadEditor1.Content);
        String temp = "UPDATE raddata SET data='" + RadEditor1.Content + "' WHERE pageid='temp';";
        con.accesssetdata(temp);
        return;
    }

this is rough coding just giving idea

please help me with this

on page i am using:
RadScriptManager
RadMenu
RadEditor


please reply fast as this is my college project and i have to submit it after 2 days
please needed help very badly

RadEditor

2 Answers, 1 is accepted

Sort by
0
Accepted
Schlurk
Top achievements
Rank 2
answered on 01 Feb 2010, 04:42 PM
Not sure exactly what issues you are running into but from the look of things you are using the RadEditor's Content property as a String, which is correct. Here's a small sample page which shows how to get and set the content of the RadEditor, which should work for you. What are the problems you are experiencing with the RadEditor?

ASPX:
<html xmlns="http://www.w3.org/1999/xhtml"
<head id="Head1" runat="server"
    <title>Test</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <asp:Button ID="myButton" runat="server" Text="Set Content" OnClick="myButton_Click" /> 
    <br /> 
    <asp:Button ID="testButton" runat="server" Text="Get Content" OnClick="testButton_Click" /> 
    <br /> 
    <telerik:RadEditor ID="RadEditor1" runat="server"
    </telerik:RadEditor> 
    </form> 
</body> 
</html> 

C#:
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!IsPostBack) 
        { 
            RadEditor1.Content = "Load Content"
        } 
    } 
 
    protected void myButton_Click(object sender, EventArgs e) 
    { 
        RadEditor1.Content = "Test"
    } 
 
    protected void testButton_Click(object sender, EventArgs e) 
    { 
        Response.Write(RadEditor1.Content); 
    } 

0
sadiqabbas
Top achievements
Rank 1
answered on 08 Feb 2010, 08:23 AM
i got it

so silly i was

i forgot to insert

if(!IsPostBack)
Tags
Editor
Asked by
sadiqabbas
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
sadiqabbas
Top achievements
Rank 1
Share this question
or