raddock with css

2 posts, 0 answers
  1. Farshad heidary
    Farshad heidary avatar
    53 posts
    Member since:
    Oct 2009

    Posted 29 May 2010 Link to this post

    hi guys

    i save content page in database and wanna add it to RadDock
    for example i save this code in database :
    string str="<div style="background-color: Red; color: black;">
    This is a sample text</div>";

    i want to se backround red and font cloro is black

    but i cant.

  2. Pero
    Pero avatar
    1156 posts

    Posted 02 Jun 2010 Link to this post

    Hi Farshad,

    I tried the following code, and the background color is applied and the fore color too. I attached a screenshot showing this.

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head id="Head1" runat="server">
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
                <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                    <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px">

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
    using System.Web.Caching;
    public partial class Default_Dock : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            string str = "<div style='background-color: Red; color: black;'>This is a sample text</div>";
            RadDock1.Text = str;

    Could you please give us more information about the issue?

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top