Show or Hide Div/Panel if Editor has no content.

3 posts, 0 answers
  1. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 22 Aug 2008 Link to this post

    Hello,

    I have a editor inside a div or even a panel. If the editor has no content I want to make the set the div visibility to false.

    I have set the div as a server contol but not sure how or what the syntax is to find if the editor is emply.

    Any help would be appreciated.

    Thanks
  2. Kevin Babcock
    Kevin Babcock avatar
    189 posts
    Member since:
    Mar 2007

    Posted 24 Aug 2008 Link to this post

    Hello Sayitfast,

    You can check the Contents property of the RadEditor to see if has any text/markup. If you set the div to runat="server" you can reference it directly by its ID and set its Visible property to false.

    1 if (String.IsNullOrEmpty(RadEditor1.Content)) 
    2
    3     divEditor.Visible = false
    4


    I hope this helps.

    Regards,
    Kevin Babcock
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 25 Aug 2008 Link to this post

    Thank you... works perfect.   Woo hoo!
Back to Top