ASP.NET server control width

2 posts, 0 answers
  1. Rob
    Rob avatar
    3 posts
    Member since:
    Jan 2015

    Posted 03 Aug 2015 Link to this post

    Another newbie question that has always perplexed me in terms of server controls. Width & height can be set both as a style or as a property:

    <telerik:RadMenu ID="RadMenu1" Runat="server" style="Height=30px;" Height="50px">

    What is the difference between the two and which should one actually use?

    Thanks, Rob.

  2. Vessy
    Vessy avatar
    1664 posts

    Posted 04 Aug 2015 Link to this post

    Hello Rob,

    If you want to use the control's API to set its height (handling the proper height for all its nested elements), you should have the following configuration:
    <telerik:RadMenu ID="RadMenu1" Runat="server" Height="50px"></telerik:RadMenu>

    Please note, that style="Height=30px;" is invalid configuration and it is highly recommended to avoid it.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top