Expresion Expected Error - VS 2005 - Migrated from VS 2003

Discussion in 'ASP .Net Building Controls' started by John Banks, Jan 25, 2007.

  1. John Banks

    John Banks Guest

    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 %>

    Does anyone have any ideas?
    John Banks, Jan 25, 2007
    1. Advertisements

  2. 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.
    Nathaniel Greene, Jan 26, 2007
    1. Advertisements

  3. John Banks

    jdlwright Guest

    I could be wrong - but shouldn't this


    be, either





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

    May be the problem?

    jdlwright, Jan 27, 2007
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.