Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

Discussion in 'ASP .Net' started by Anand Ganesh, Feb 23, 2008.

  1. Anand Ganesh

    Anand Ganesh Guest

    Hello Everybody,

    I have a line in a Javascript function as follows

    <%=ServerSideVariable%>;

    This works fine in 2005.NET

    But in 2008.NET Visual Web Developer this gives as warning saying
    "Expression Expected" and during runtime throws syntax error.

    Any suggestions please.

    I use this for ASP.NET callback feature.


    Thanks
    Anand Ganesh
     
    Anand Ganesh, Feb 23, 2008
    #1
    1. Advertising

  2. "Anand Ganesh" <> wrote in message
    news:...

    > I have a line in a Javascript function as follows
    >
    > <%=ServerSideVariable%>;
    >
    > This works fine in 2005.NET


    Please post the JavaScript function...

    > But in 2008.NET Visual Web Developer this gives as warning saying
    > "Expression Expected" and during runtime throws syntax error.


    And what is the syntax error...?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Feb 23, 2008
    #2
    1. Advertising

  3. Anand Ganesh

    Anand Ganesh Guest

    It says "A runtime error has occured. Do you wish to Debug ?" Line 35 :
    Syntax Error.

    The moment I comment the following then all works fine.

    Very strange indeed.

    //<%=ServerSideVariable%>;

    Thank you for replying to me.

    Regards
    Anand

    "Mark Rae [MVP]" <> wrote in message
    news:%...
    > "Anand Ganesh" <> wrote in message
    > news:...
    >
    >> I have a line in a Javascript function as follows
    >>
    >> <%=ServerSideVariable%>;
    >>
    >> This works fine in 2005.NET

    >
    > Please post the JavaScript function...
    >
    >> But in 2008.NET Visual Web Developer this gives as warning saying
    >> "Expression Expected" and during runtime throws syntax error.

    >
    > And what is the syntax error...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    Anand Ganesh, Feb 24, 2008
    #3
  4. "Anand Ganesh" <> wrote in message
    news:%...

    >>> I have a line in a Javascript function as follows
    >>>
    >>> <%=ServerSideVariable%>;
    >>>
    >>> This works fine in 2005.NET

    >>
    >> Please post the JavaScript function...
    >>
    >>> But in 2008.NET Visual Web Developer this gives as warning saying
    >>> "Expression Expected" and during runtime throws syntax error.

    >>
    >> And what is the syntax error...?

    >
    > It says "A runtime error has occurred. Do you wish to Debug ?" Line 35 :
    > Syntax Error.
    >
    > The moment I comment the following then all works fine.
    >
    > Very strange indeed.
    >
    > //<%=ServerSideVariable%>;


    So what happens when you debug...? Does ServerSideVariable have a value...?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Feb 24, 2008
    #4
  5. Anand Ganesh

    Anand Ganesh Guest

    Mark,

    I am not able to go that line itself.

    It just throws error even before debugger reaches that line.

    Only if I comment that line my program execution resumes to normal
    behaviour.

    Thanks
    Anand

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "Anand Ganesh" <> wrote in message
    > news:%...
    >
    >>>> I have a line in a Javascript function as follows
    >>>>
    >>>> <%=ServerSideVariable%>;
    >>>>
    >>>> This works fine in 2005.NET
    >>>
    >>> Please post the JavaScript function...
    >>>
    >>>> But in 2008.NET Visual Web Developer this gives as warning saying
    >>>> "Expression Expected" and during runtime throws syntax error.
    >>>
    >>> And what is the syntax error...?

    >>
    >> It says "A runtime error has occurred. Do you wish to Debug ?" Line 35 :
    >> Syntax Error.
    >>
    >> The moment I comment the following then all works fine.
    >>
    >> Very strange indeed.
    >>
    >> //<%=ServerSideVariable%>;

    >
    > So what happens when you debug...? Does ServerSideVariable have a
    > value...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    Anand Ganesh, Feb 24, 2008
    #5
  6. Anand Ganesh

    Anand Ganesh Guest

    Mark,

    This is my original problem which I have posted in another thread with subject as "Cookie Issue in IE even when Cookie is not used" in this same forum.

    To resolve this cookie issue I was trying to use the ICallbackEventHandler so I can get the value from the first page to the second page.

    If you visit www.advancedtechnologyworks.com you can understand my problem.

    Thank you for spending your valuable time in helping me out.

    With best regards
    Anand Ganesh


    "Anand Ganesh" <> wrote in message news:u$...
    > Mark,
    >
    > I am not able to go that line itself.
    >
    > It just throws error even before debugger reaches that line.
    >
    > Only if I comment that line my program execution resumes to normal
    > behaviour.
    >
    > Thanks
    > Anand
    >
    > "Mark Rae [MVP]" <> wrote in message
    > news:...
    >> "Anand Ganesh" <> wrote in message
    >> news:%...
    >>
    >>>>> I have a line in a Javascript function as follows
    >>>>>
    >>>>> <%=ServerSideVariable%>;
    >>>>>
    >>>>> This works fine in 2005.NET
    >>>>
    >>>> Please post the JavaScript function...
    >>>>
    >>>>> But in 2008.NET Visual Web Developer this gives as warning saying
    >>>>> "Expression Expected" and during runtime throws syntax error.
    >>>>
    >>>> And what is the syntax error...?
    >>>
    >>> It says "A runtime error has occurred. Do you wish to Debug ?" Line 35 :
    >>> Syntax Error.
    >>>
    >>> The moment I comment the following then all works fine.
    >>>
    >>> Very strange indeed.
    >>>
    >>> //<%=ServerSideVariable%>;

    >>
    >> So what happens when you debug...? Does ServerSideVariable have a
    >> value...?
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net

    >
    >
     
    Anand Ganesh, Feb 24, 2008
    #6
    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. ad
    Replies:
    5
    Views:
    1,622
  2. Brad  Brening
    Replies:
    0
    Views:
    471
    Brad Brening
    Mar 1, 2007
  3. =?Utf-8?B?QWxleCBGaW1pbmU=?=

    IE6 doesnt render the page properly whereas IE7 does

    =?Utf-8?B?QWxleCBGaW1pbmU=?=, Aug 31, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    413
    Patrice
    Aug 31, 2007
  4. HRsoft Informática

    Visual Web Express 2008 X Visual Studio Pro 2008

    HRsoft Informática, Jun 8, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    778
    Cowboy \(Gregory A. Beamer\)
    Jun 9, 2008
  5. Flanman
    Replies:
    1
    Views:
    461
    Juan T. Llibre
    Jun 26, 2008
Loading...

Share This Page