0

Dear Experts,
Your Help is always Appriciated

Scenario:
OS.server 2003,
VB +ASP.NET
VS2005

My application is developed in 2003 on vs2003, now validation error while checking in design mode.
This application is using two classes with if condition.

Error 36 Cannot switch views: Validation (Internet Explorer 6): Attribute 'class' can be specified only once in a tag. 70

<td valign="top" align="center" nowrap <%if dx("stat")="N" then%> class="grrdata5" <%elseif dx("stat")="P" then%>  class="grrdata3" <%else%> class="isodata" <%end if%>>  <%=dx("stat")%>  </td>
2
Contributors
4
Replies
6
Views
5 Years
Discussion Span
Last Post by naveedqadri
0

I think it would be easier to add an ID and a runat="server" attribute to the TD and change the class from codebehind.
Just put a default class there, run the IF statement in the codebehind code and change the class from there.

0

Thnks Oxiegen,
Actually I am using CSS, runat server is behind. Valilldation mode is IE6 in VS2010.

0

That's kind of the point.
In codebehind you can set which CSS class to use at any given moment.

What you'll do is simply shifting from ASP style code to ASP.NET style code.

A second choice that you have is to use only one class specification, but perform the IF's and class changes using JavaScript.
There are many tutorials out there on how to accomplish this.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.