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

Fromdecorator not styling labels within Masterpage

1 Answer 95 Views
FormDecorator
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 02 May 2012, 04:35 PM

I setup a basic masterpage and added a RadFormDecorator with decoratedcontrols="all".  I then create a new webform from the masterpage and run the web project but labels are not styled.  Other web controls are styled.

What am I missing? here is the simple master page:

You can notice the label within (<div id="header"> ) is not styled.

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Untitled Document</title>
  <style type="text/css">
    html, body
    {
      height: 100%;
    }
      
    #container
    {
      min-height: 100%;
      margin-bottom: -20px;
      position: relative;
    }
      
    #footer
    {
      height: 20px;
      position: relative;
    }
      
    .clearfooter
    {
      height: 20px;
      clear: both;
    }
  </style>
</head>
<body leftmargin="0" topmargin="0">
  <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"
    Skin="Office2010Black" />
  <div id="container">
    <form runat="server" id="frmMasterPage">
    <telerik:RadScriptManager ID="rsmMasterPage" runat="server">
    </telerik:RadScriptManager>
    <div id="header"><asp:Label runat="server" ID="lblHeader" Text="This is the header"></asp:Label></div>
    <div id="nav">
      <telerik:RadMenu ID="RadMenu1" runat="server">
        <Items>
          <telerik:RadMenuItem runat="server" Text="Reporting">
          </telerik:RadMenuItem>
          <telerik:RadMenuItem runat="server" Text="Maintenance">
          </telerik:RadMenuItem>
          <telerik:RadMenuItem runat="server" Text="Administration">
          </telerik:RadMenuItem>
        </Items>
      </telerik:RadMenu>
    </div>
    <div id="content"><asp:ContentPlaceHolder ID="cphContent" runat="server"></asp:ContentPlaceHolder></div>
    <div class="clearfooter">
    </div>
    </form>
  </div>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 03 May 2012, 11:01 AM
Hi,

Excuse us for the inconvenience, but asp:label is rendered as span element and we could not detect and style it. For that reason, we have added into our CSS a class named: rfdAspLabel, that could be set through the CssClass property and that span will be styled:

<div id="header">
        <asp:Label runat="server" ID="lblHeader" Text="This is the header" CssClass="rfdAspLabel"></asp:Label></div>


Kind regards,
Bozhidar
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
Tags
FormDecorator
Asked by
Robert
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or