views:

170

answers:

3

In the code below, I am trying to apply a Dijit theme to the controls in my .aspx page. However, the controls persist in their normal, unthemed appearance.

Anybody know why?

Master Page:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Main.master.cs" Inherits="WebJournalEntryClient.Main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>My Web Application</title>
    <link rel="stylesheet" href="dojoroot/dijit/themes/tundra/tundra.css" />
     <script type="text/javascript" src="dojoroot/dojo/dojo.js"/>
     <script type="text/javascript">
         dojo.require("dijit.form.Button");
         dojo.require("dijit.form.TextBox");
         dojo.require("dijit.form.ComboBox");
     </script>
</head>
<body class = "tundra">
    <form id="form1" runat="server">
    <div>
        <div>
            This is potentially space for a header bar.
        </div>
        <table>
        <tr>
            <td>
                Maybe <br /> a <br /> Side <br /> bar.
            </td>
            <td>
                <asp:ContentPlaceHolder ID="CenterPlaceHolder" runat="server"/>
            </td>
        </tr>
        </table>
        <div>
            This is potentially space for a footer bar.
        </div>
    </div>
    </form>
</body>
</html>

Content Page:

<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"       CodeBehind="LogIn.aspx.cs" Inherits="WebJournalEntryClient.LogIn" %>
<asp:Content ID="Content" ContentPlaceHolderID="CenterPlaceHolder" runat="server">
    <div>
    User ID: <asp:TextBox ID = "UserName" dojoType="dijit.form.TextBox" runat="server" /><br />
    Password: <asp:TextBox ID = "PassWord" dojoType="dijit.form.TextBox" runat="server" /><br />
    <asp:Button ID="LogInButton" Text="Log In" dojoType="dijit.form.Button" runat="server" />
    </div>
</asp:Content>
A: 

Could be the path is wrong. Use Firebug to see if it's reading any css.

Martin
The browser is definitely downloading tundra.css
mcoolbeth
A: 

I am not sure about what ASP.net is doing with your page. However in any case can you double check with firebug wheather your body has "tundra" class in the Browser Output ?? I am assuming that the CSS is comming properly (: as you mentioned in above comment)

A: 

You need to add djConfig="parseOnLoad: true" to you script tag.

Or

dojo.parser.parse();

nightynate