开发者

Theming doesnt work

开发者 https://www.devze.com 2023-03-19 08:32 出处:网络
I set a theme folder with a skin folder in it.. with this inside: <asp:Label Runat=\"server\" Font-Size=\"Large\" Font-Bold=\"True\" Font-Italic=\"True\"/>

I set a theme folder with a skin folder in it.. with this inside:

<asp:Label Runat="server" Font-Size="Large" Font-Bold="True" Font-Italic="True"/>

My page directive:

<%@ Page Title="" Language="C#" MasterPageFile="~/YourGuruMaster.master" AutoEventWireup="true" CodeFile="AnswerQuestion.aspx.cs" Inherits="AnswerQuestion" StylesheetTheme="AnswerDesign"%>

The code beh开发者_Python百科ind where i set the label automatically:

        Label title = new Label();
    title.SkinID = "Blue";
    title.Text = QuestionRequest;
    PlaceHolder2.Controls.Add(title);


At the first you are miss the SkinID property in label skin. And as you add label dynamically use Theme Page's directive attribute instead of the StylesheetTheme.

Follow this link for clarification why you must use Theme property in this case: Page.StyleSheetTheme Property

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号