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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anand Ganesh

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

    Hello Everybody,

    I have a line in a Javascript function as follows

    <%=ServerSideVa riable%>;

    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


  • Mark Rae [MVP]

    #2
    Re: Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

    "Anand Ganesh" <anand_ganesh@c omputer.orgwrot e in message
    news:uQvxqOfdIH A.2484@TK2MSFTN GP04.phx.gbl...
    I have a line in a Javascript function as follows
    >
    <%=ServerSideVa riable%>;
    >
    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


    Comment

    • Anand Ganesh

      #3
      Re: Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

      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.

      //<%=ServerSideVa riable%>;

      Thank you for replying to me.

      Regards
      Anand

      "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
      news:%23rVgBFhd IHA.6136@TK2MSF TNGP03.phx.gbl. ..
      "Anand Ganesh" <anand_ganesh@c omputer.orgwrot e in message
      news:uQvxqOfdIH A.2484@TK2MSFTN GP04.phx.gbl...
      >
      >I have a line in a Javascript function as follows
      >>
      ><%=ServerSideV ariable%>;
      >>
      >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

      Comment

      • Mark Rae [MVP]

        #4
        Re: Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

        "Anand Ganesh" <anand_ganesh@c omputer.orgwrot e in message
        news:%2386Kqupd IHA.148@TK2MSFT NGP04.phx.gbl.. .
        >>I have a line in a Javascript function as follows
        >>>
        >><%=ServerSide Variable%>;
        >>>
        >>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.
        >
        //<%=ServerSideVa riable%>;
        So what happens when you debug...? Does ServerSideVaria ble have a value...?


        --
        Mark Rae
        ASP.NET MVP


        Comment

        • Anand Ganesh

          #5
          Re: Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

          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]" <mark@markNOSPA Mrae.netwrote in message
          news:e30FnypdIH A.4260@TK2MSFTN GP05.phx.gbl...
          "Anand Ganesh" <anand_ganesh@c omputer.orgwrot e in message
          news:%2386Kqupd IHA.148@TK2MSFT NGP04.phx.gbl.. .
          >
          >>>I have a line in a Javascript function as follows
          >>>>
          >>><%=ServerSid eVariable%>;
          >>>>
          >>>This works fine in 2005.NET
          >>>
          >>Please post the JavaScript function...
          >>>
          >>>But in 2008.NET Visual Web Developer this gives as warning saying
          >>>"Expressio n 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.
          >>
          >//<%=ServerSideVa riable%>;
          >
          So what happens when you debug...? Does ServerSideVaria ble have a
          value...?
          >
          >
          --
          Mark Rae
          ASP.NET MVP
          http://www.markrae.net

          Comment

          • Anand Ganesh

            #6
            Re: Expression Expected Error in Visual Web Developer 2008.NET whereas works fine in 2005.NET

            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 ICallbackEventH andler 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" <anand_ganesh@c omputer.orgwrot e in message news:u$yLaQydIH A.4144@TK2MSFTN GP05.phx.gbl...
            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]" <mark@markNOSPA Mrae.netwrote in message
            news:e30FnypdIH A.4260@TK2MSFTN GP05.phx.gbl...
            >"Anand Ganesh" <anand_ganesh@c omputer.orgwrot e in message
            >news:%2386Kqup dIHA.148@TK2MSF TNGP04.phx.gbl. ..
            >>
            >>>>I have a line in a Javascript function as follows
            >>>>>
            >>>><%=ServerSi deVariable%>;
            >>>>>
            >>>>This works fine in 2005.NET
            >>>>
            >>>Please post the JavaScript function...
            >>>>
            >>>>But in 2008.NET Visual Web Developer this gives as warning saying
            >>>>"Expressi on 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.
            >>>
            >>//<%=ServerSideVa riable%>;
            >>
            >So what happens when you debug...? Does ServerSideVaria ble have a
            >value...?
            >>
            >>
            >--
            >Mark Rae
            >ASP.NET MVP
            >http://www.markrae.net
            >

            Comment

            Working...