By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,206 Members | 1,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,206 IT Pros & Developers. It's quick & easy.

Help making css styles work

P: n/a
My ASP.NET 2.0 application has a User Control that contains a DataList that
is unable to get style information from a style located in a css file in the
themes folder. The user control CssClass and the DataList ItemStyle CssClass
properties are both set to a valid name of a style in a stylesheet located
in a subfolder of the App_Themes folder. The Web.config file contains a
<pages theme property that references the name of the themes folder. Please
take a look at the source code below and let me know if you see anything
obviously wrong.

Thanks,

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Welcome to Build Task Manager
</title><link href="App_Themes/BTMDefault/BTMDefault.css" type="text/css"
rel="stylesheet" /></head>
<body>
<form name="aspnetForm" method="post" action="default.aspx"
id="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTEwMDUyNjYzMjgPZBYCZg9kFgICAw9kFgICAw9kFgJ mDzwrAAkBAA8WBB4IRGF0YUtleXMWAB4LXyFJdGVtQ291bnQCB GQWCAIBD2QWAgIBDw8WAh4EVGV4dAUJUmVtaW5kZXIxZGQCAg9 kFgICAQ8PFgIfAgUJUmVtaW5kZXIyZGQCAw9kFgICAQ8PFgIfA gUJUmVtaW5kZXIzZGQCBA9kFgICAQ8PFgIfAgUJUmVtaW5kZXI 0ZGRkPm7a8PKDeoSgdqYmo9uV4krJkaA="
/>
</div>

<table cellspacing="0" cellpadding="0" width="770" border="1">
<tr>
<td width="100" valign="top">
List of Departments
<br />
List of Categories
<br />
</td>
<td valign="top">
&nbsp;
<p align="left">
<a href="Default.aspx">
<img src="Images/BTMLogo.gif" border="0" />
</a>
</p>

<table id="ctl00_Reminders1_list"
class="ReminderListContent" cellspacing="0" border="0"
style="width:670px;border-collapse:collapse;">
<tr>
<td class="ReminderListHead">
Reminders
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl01_HyperLink1">Remind er1</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl02_HyperLink1">Remind er2</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl03_HyperLink1">Remind er3</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl04_HyperLink1">Remind er4</a>
</td>
</tr>
</table>

</td>
</tr>
</table>
</form>
</body>
</html>
Mar 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I found the problem... I had forgotten to precede the style name with a
period. in the style sheet.

Thanks,

Keith

"keithb" <kb******@dslextreme.com> wrote in message
news:Og*************@TK2MSFTNGP14.phx.gbl...
My ASP.NET 2.0 application has a User Control that contains a DataList
that is unable to get style information from a style located in a css file
in the themes folder. The user control CssClass and the DataList ItemStyle
CssClass properties are both set to a valid name of a style in a
stylesheet located in a subfolder of the App_Themes folder. The Web.config
file contains a <pages theme property that references the name of the
themes folder. Please take a look at the source code below and let me know
if you see anything obviously wrong.

Thanks,

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

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Welcome to Build Task Manager
</title><link href="App_Themes/BTMDefault/BTMDefault.css" type="text/css"
rel="stylesheet" /></head>
<body>
<form name="aspnetForm" method="post" action="default.aspx"
id="aspnetForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTEwMDUyNjYzMjgPZBYCZg9kFgICAw9kFgICAw9kFgJ mDzwrAAkBAA8WBB4IRGF0YUtleXMWAB4LXyFJdGVtQ291bnQCB GQWCAIBD2QWAgIBDw8WAh4EVGV4dAUJUmVtaW5kZXIxZGQCAg9 kFgICAQ8PFgIfAgUJUmVtaW5kZXIyZGQCAw9kFgICAQ8PFgIfA gUJUmVtaW5kZXIzZGQCBA9kFgICAQ8PFgIfAgUJUmVtaW5kZXI 0ZGRkPm7a8PKDeoSgdqYmo9uV4krJkaA="
/>
</div>

<table cellspacing="0" cellpadding="0" width="770" border="1">
<tr>
<td width="100" valign="top">
List of Departments
<br />
List of Categories
<br />
</td>
<td valign="top">
&nbsp;
<p align="left">
<a href="Default.aspx">
<img src="Images/BTMLogo.gif" border="0" />
</a>
</p>

<table id="ctl00_Reminders1_list"
class="ReminderListContent" cellspacing="0" border="0"
style="width:670px;border-collapse:collapse;">
<tr>
<td class="ReminderListHead">
Reminders
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl01_HyperLink1">Remind er1</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl02_HyperLink1">Remind er2</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl03_HyperLink1">Remind er3</a>
</td>
</tr><tr>
<td class="ReminderListContent">
<a id="ctl00_Reminders1_list_ctl04_HyperLink1">Remind er4</a>
</td>
</tr>
</table>

</td>
</tr>
</table>
</form>
</body>
</html>

Mar 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.