How do I apply CCS styles to the StyleDropDown...

Last post 01-26-2004, 1:15 PM by BruceD. 2 replies.
Sort Posts: Previous Next
  •  01-22-2004, 3:31 PM 247

    How do I apply CCS styles to the StyleDropDown...

    I have seen the post that explains how to assign a style sheet to the editor to be displayed in the dropdown list box control for styles. But in my code behind...the editor doesn't exhibit the properties StyleDropDownMenuNames or StyleDropDownMenuList. And if I simply try to add my styles through the VS .NET property sheet for the StyleDropDown control, using the Collection property editor, still no luck.

     

    What is the proper procedure?

  •  01-25-2004, 6:27 PM 252 in reply to 247

    Re: How do I apply CCS styles to the StyleDropDown...

     

    BruceD,

     

    Below is a example of showing how to apply the CSS styles to the styledropdownlist. You can also find the example code in the download package.  If you still have problem, please let me know.

     

    <script runat="server">

    void Page_Load(object sender, System.EventArgs e)

    {

        DropDownList tempstyleDropDown = new DropDownList();

       //apply CCS styles here

       tempstyleDropDown.Items.Add(new ListItem("Style 1","Heading"));

       tempstyleDropDown.Items.Add(new ListItem("Style 2","Head"));

       tempstyleDropDown.Items.Add(new ListItem("Style 3","Subhead"));

       tempstyleDropDown.Items.Add(new ListItem("Style 4","NormalRed"));

       tempstyleDropDown.Items.Add(new ListItem("Style 5","Comment"));

       Editor1.StyleDropDown = tempstyleDropDown;

    }

    </script>

    <CE:Editor id="Editor1" DownloadableDocumentPath="~/uploads/document" AutoConfigure="EnableAll" runat="server" ></CE:Editor>


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-26-2004, 1:15 PM 256 in reply to 252

    Re: How do I apply CCS styles to the StyleDropDown...

    Thanks...works like a charm...
View as RSS news feed in XML