Click here to Skip to main content
15,895,796 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
After reading the following, can you see why I do not get the css to work please? thanks
Maybe there is something I have to place for this css?
I am using VS2010 to build a web project.
I have added the folder App_Themes.
Under it there is a subfolder called AADefault. Under this there is AA.css
Inside AA.css I have added the following:
HTML
.DepartmentListContent
{
...
}



The .ascx file has this in the source:
ASP.NET
<asp:DataList ID="list" runat="server" Width="200px" CssClass="DepartmentListContent">


Should I put anything in the web.config?
I paced
HTML
<pages themes="AA.css" />

But there is an error it says unrecognized which refers to pages
Posted
Updated 12-Jul-12 7:04am
v2

You need to add a reference to an external CSS stylesheet in your aspx page.
E.g.
XML
<link href="CSS/StyleSheet.css" rel="stylesheet" type="text/css" />


You can find a reference to this at http://msdn.microsoft.com/en-us/library/tbze79kd%28v=vs.80%29.aspx[^] well.
 
Share this answer
 
you are saying that you are putting your css file inside a subfolder called AADefault under App_Theme folder, After doing this you need to tell your webpages that which folder is holding the css file so you need to write following code in web.config:-
XML
<pages theme="AADefault">
</pages>


where AADefault is your folder name which containing your css file.
this is all you need to do.

Good luck.
 
Share this answer
 
Comments
arkiboys 13-Jul-12 5:41am    
Thanks
Raje_ 13-Jul-12 6:09am    
Welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900