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

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

  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.

    "John Banks" wrote:

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

  3. John Banks

    Guest

    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

    On Jan 25, 12:13 pm, John Banks <> wrote:
    > 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?
     
    , Jan 27, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R3JlZyBTbWFsdGVy?=

    Migrated web site still runs in IIS rather than ASP Development Se

    =?Utf-8?B?R3JlZyBTbWFsdGVy?=, Nov 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    587
    Juan T. Llibre
    Nov 14, 2005
  2. Replies:
    1
    Views:
    320
  3. Jon Davis
    Replies:
    3
    Views:
    603
    Jon Davis
    Jun 21, 2007
  4. Tom Petersen
    Replies:
    0
    Views:
    146
    Tom Petersen
    Nov 17, 2003
  5. Filipe

    Regular Expresion Error?

    Filipe, Sep 29, 2007, in forum: Ruby
    Replies:
    4
    Views:
    114
    Filipe
    Oct 5, 2007
Loading...

Share This Page