Expresion Expected Error - VS 2005 - Migrated from VS 2003

J

John Banks

I have an asp.net project that I have migrated to VS 2005. The product
had zero errors in vs2003 and for the most part functions properly in
2005 except for one complicated page where I am receiving an Expression
Expected error on some very simplistic code. Please forgive the fact
that the code did not format properly below: I get the error on the
<% If statement line. There is no Line continuation here.

<TD style="HEIGHT: 23px" colSpan="3">
<% If CurrentBICP.Id =OD OrElse (CurrentBICP.Suspended And
CurrentBICP.CurrentVersionNo = 1) OrElse
DataBinder.Eval(CurrentBICP.Type, TypeQuote) Then%>
<asp:CheckBox id="cbxPropertyAfforded" runat="server"
Checked="True" />
<% Else %>
<% If YesNo2Bool(CurrentBICP.PropertyAfforded) Then %>
<img src="<%#= cCheckBoxCheckedImage %>"/>
<% Else %>
<img src="<%#= cCheckBoxUncheckedImage %>"/>
<% End If %>
<% End If %>
</TD>

Does anyone have any ideas?
 
N

Nathaniel Greene

Have you tried removing the nested else statement to see which If statement
it is?
If the error does not go away remove the whole Else clause
And if that doesnt work try removing all but one of the If conditions
Then slowly add them back to see which one is causing the problem.
 
J

jdlwright

I could be wrong - but shouldn't this

<%#=

be, either

<%#

or

<%=

?

I've always used <%# but I guess it could be the same as <%=.

May be the problem?

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top