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

Images not showing in RadEditor Content Area

1 Answer 110 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shelley
Top achievements
Rank 1
Shelley asked on 11 Jun 2009, 08:24 PM
I have a RadEditor on a page in a password secured admin section of my website. When I load the page, I am loading the content from my SQL Server 2005 database. Any image included in the content comes up as a red x instead of displaying the image. If I go into the image manager and replace it, the image shows up fine until the page is reloaded, then it goes back to the red x. When I load the content into my home page, the images display correctly (I use an asp repeater control). How do I fix the red x issue in rad editor?

aspx code:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                    </telerik:RadScriptManager>                   
              
              <span class="home_intro">Page Content:</span><br />
                <telerik:radeditor ID="redPageContent" runat="server" Height="1050px"
                Width="576">
                    <ImageManager UploadPaths="~/assets/images" ViewPaths="~/assets/images" />
                                        <Content></Content>
                </telerik:radeditor>

c# code:
protected void GetText()
    {
        string ID = Request.QueryString["ID"].ToString();
        // Set variables & db connection
        DataTable objDs = new DataTable();
        SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["CMI"].ConnectionString);
        SqlDataAdapter da = new SqlDataAdapter("SELECT ContentDesc, ContentSidebar, ContentPage, ContentSubPage FROM tblContent WHERE ContentID=" + ID + ";", myConnection);
        myConnection.Open();
        da.Fill(objDs);
        if (objDs.Rows.Count > 0)
        {
            DataRow myRow = objDs.Rows[0];
            redPageContent.Content = myRow["ContentDesc"].ToString();
            redSidebarContent.Content = myRow["ContentSidebar"].ToString();
            lblPageName.Text = myRow["ContentPage"].ToString() + " - " + myRow["ContentSubPage"].ToString();
        }
        myConnection.Close();

    }

1 Answer, 1 is accepted

Sort by
0
Shelley
Top achievements
Rank 1
answered on 11 Jun 2009, 09:47 PM
I figured it out...I need to add an extra folder name because the image folder is outside of the admin area.
Tags
Editor
Asked by
Shelley
Top achievements
Rank 1
Answers by
Shelley
Top achievements
Rank 1
Share this question
or