VS 2003 and Panels question

BlakeMcKenna

Active member
Joined
Oct 27, 2008
Messages
38
Programming Experience
10+
I have a VS 2003 Web app that I'm creating. I'm using a Panel control and I'm trying to apply a CSS class to this panel. However, when I try code the following statement

<asp:panel class="pnl2" runat="server">

it doesn't like the "class" attribute saying "could not find any attribute 'class' of element panel"?

I'm used to using VS 2005 and higher and haven't seen this before. What am I doing wrong?

Thanks,

Blake
 
Have you tried setting the CssClass property code-side to point to your css class?

There are a few controls that don't accept a 'class' on the markup side of the equation - pretty sure it's because they get converted to standard HTML controls at runtime - a Panel is rendered as a DIV I believe.
 
Back
Top