BC32017: Comma, ')', or a valid expression continuation expected.

Discussion in 'Microsoft Dot NET' started by Guest, Mar 13, 2007.

  1. Guest

    Guest Guest

    I am trying to dynamically create a javascript link. But, I get the following
    error:

    BC32017: Comma, ')', or a valid expression continuation expected.


    Here is the line I try creating the link. I'm done staring at it. Can
    someone else see what may be the matter. Fresh pair of eyes maybe? Thanks:

    <a href='javascript:popIt(<%# chr(39)
    %>java/ipix/ipix-viewer.aspx?FileString=<%#
    DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>, 375,
    350)' class="more">
     
    Guest, Mar 13, 2007
    #1
    1. Advertisements

  2. Guest

    clintonG Guest

    I'm having similar problems. Let me ask you a question about the FileString
    parameter used by the Eval method.


    // What are the [ ] brackets for? Are they supposed to be output as text
    literals?
    "[\"FileString\"]"

    On the other hand -- my problem -- with the Eval method is writing out a
    delineated string of text.


    // need this ouput
    'Title'

    // is not working for me
    "\'Title\'"

    Other than that and to get back to your error message...

    I wondered why you wrote the <%#... %>data binding evaluator for chr(39)?
    Here's what I have learned. In ASP <%= ...%> was an evaluator for writing
    variant data types to the response. Similarly when binding to a control the
    data being bound is being cast to a string data type by <%#...%>.


    // Have you wrote this way?
    <a href='javascript:popIt(java/ipix/ipix-viewer.aspx?
    FileString=<%# DataBinder.Eval(Container.DataItem,
    "[\"FileString\"]") & chr(39) %>, 375, 350)'
    class="more">...</a>


    <%= Clinton Gallagher
    NET csgallagher AT metromilwaukee.com
    URL http://clintongallagher.metromilwaukee.com/




    "Erica" <> wrote in message
    news:...
    >I am trying to dynamically create a javascript link. But, I get the
    >following
    > error:
    >
    > BC32017: Comma, ')', or a valid expression continuation expected.
    >
    >
    > Here is the line I try creating the link. I'm done staring at it. Can
    > someone else see what may be the matter. Fresh pair of eyes maybe? Thanks:
    >
    > <a href='javascript:popIt(<%# chr(39)
    > %>java/ipix/ipix-viewer.aspx?FileString=<%#
    > DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>, 375,
    > 350)' class="more">
    >
     
    clintonG, Mar 14, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Re: BC32017: Comma, ')', or a valid expression continuation expect

    Clinton, Thanks for replying.

    I actually had a brain freeze and was thinking C#.

    I changed the line to the following:

    <%# ((System.Data.DataRow)Container.DataItem)["FileString"] %>

    Which makes the comma error go away, but now I'm getting the following error
    on that line:

    BC30691: 'DataRow' is a type in 'Data' and cannot be used as an expression.

    Any idea on what that may be?

    Regarding your problem, can you post some code. Thanks.

    "clintonG" wrote:

    > I'm having similar problems. Let me ask you a question about the FileString
    > parameter used by the Eval method.
    >
    >
    > // What are the [ ] brackets for? Are they supposed to be output as text
    > literals?
    > "[\"FileString\"]"
    >
    > On the other hand -- my problem -- with the Eval method is writing out a
    > delineated string of text.
    >
    >
    > // need this ouput
    > 'Title'
    >
    > // is not working for me
    > "\'Title\'"
    >
    > Other than that and to get back to your error message...
    >
    > I wondered why you wrote the <%#... %>data binding evaluator for chr(39)?
    > Here's what I have learned. In ASP <%= ...%> was an evaluator for writing
    > variant data types to the response. Similarly when binding to a control the
    > data being bound is being cast to a string data type by <%#...%>.
    >
    >
    > // Have you wrote this way?
    > <a href='javascript:popIt(java/ipix/ipix-viewer.aspx?
    > FileString=<%# DataBinder.Eval(Container.DataItem,
    > "[\"FileString\"]") & chr(39) %>, 375, 350)'
    > class="more">...</a>
    >
    >
    > <%= Clinton Gallagher
    > NET csgallagher AT metromilwaukee.com
    > URL http://clintongallagher.metromilwaukee.com/
    >
    >
    >
    >
    > "Erica" <> wrote in message
    > news:...
    > >I am trying to dynamically create a javascript link. But, I get the
    > >following
    > > error:
    > >
    > > BC32017: Comma, ')', or a valid expression continuation expected.
    > >
    > >
    > > Here is the line I try creating the link. I'm done staring at it. Can
    > > someone else see what may be the matter. Fresh pair of eyes maybe? Thanks:
    > >
    > > <a href='javascript:popIt(<%# chr(39)
    > > %>java/ipix/ipix-viewer.aspx?FileString=<%#
    > > DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>, 375,
    > > 350)' class="more">
    > >

    >
    >
    >
     
    Guest, Mar 15, 2007
    #3
  4. Guest

    clintonG Guest

    Re: BC32017: Comma, ')', or a valid expression continuation expect

    I solved my problem using HTML character entities.

    The last error message sounds like it won't support the cast to the
    System.Data.DataRow type within the <%# ...%> databinding expression. That's
    a guess but throwing the error messages at google does what?

    --
    <%= Clinton Gallagher
    NET csgallagher AT metromilwaukee.com
    URL http://clintongallagher.metromilwaukee.com/



    "Erica" <> wrote in message
    news:...
    > Clinton, Thanks for replying.
    >
    > I actually had a brain freeze and was thinking C#.
    >
    > I changed the line to the following:
    >
    > <%# ((System.Data.DataRow)Container.DataItem)["FileString"] %>
    >
    > Which makes the comma error go away, but now I'm getting the following
    > error
    > on that line:
    >
    > BC30691: 'DataRow' is a type in 'Data' and cannot be used as an
    > expression.
    >
    > Any idea on what that may be?
    >
    > Regarding your problem, can you post some code. Thanks.
    >
    > "clintonG" wrote:
    >
    >> I'm having similar problems. Let me ask you a question about the
    >> FileString
    >> parameter used by the Eval method.
    >>
    >>
    >> // What are the [ ] brackets for? Are they supposed to be output as text
    >> literals?
    >> "[\"FileString\"]"
    >>
    >> On the other hand -- my problem -- with the Eval method is writing out a
    >> delineated string of text.
    >>
    >>
    >> // need this ouput
    >> 'Title'
    >>
    >> // is not working for me
    >> "\'Title\'"
    >>
    >> Other than that and to get back to your error message...
    >>
    >> I wondered why you wrote the <%#... %>data binding evaluator for chr(39)?
    >> Here's what I have learned. In ASP <%= ...%> was an evaluator for writing
    >> variant data types to the response. Similarly when binding to a control
    >> the
    >> data being bound is being cast to a string data type by <%#...%>.
    >>
    >>
    >> // Have you wrote this way?
    >> <a href='javascript:popIt(java/ipix/ipix-viewer.aspx?
    >> FileString=<%# DataBinder.Eval(Container.DataItem,
    >> "[\"FileString\"]") & chr(39) %>, 375, 350)'
    >> class="more">...</a>
    >>
    >>
    >> <%= Clinton Gallagher
    >> NET csgallagher AT metromilwaukee.com
    >> URL http://clintongallagher.metromilwaukee.com/
    >>
    >>
    >>
    >>
    >> "Erica" <> wrote in message
    >> news:...
    >> >I am trying to dynamically create a javascript link. But, I get the
    >> >following
    >> > error:
    >> >
    >> > BC32017: Comma, ')', or a valid expression continuation expected.
    >> >
    >> >
    >> > Here is the line I try creating the link. I'm done staring at it. Can
    >> > someone else see what may be the matter. Fresh pair of eyes maybe?
    >> > Thanks:
    >> >
    >> > <a href='javascript:popIt(<%# chr(39)
    >> > %>java/ipix/ipix-viewer.aspx?FileString=<%#
    >> > DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>,
    >> > 375,
    >> > 350)' class="more">
    >> >

    >>
    >>
    >>
     
    clintonG, Mar 15, 2007
    #4
  5. Guest

    Guest Guest

    Re: BC32017: Comma, ')', or a valid expression continuation expect

    After hours of trying different variations of the code, this is what finally
    fixed my problem:

    <%="<a href=" & chr(34) & "javascript:popIt(" & chr(39) &
    "java/ipix/ipix-viewer.aspx?FileString="%><%#Container.DataItem(2)%><%=chr(39) & ", 375, 350)" & chr(34)%> class="more"><%# Container.DataItem(1)%></a>

    Thanks Clinton for replying to my problem.

    "clintonG" wrote:

    > I solved my problem using HTML character entities.
    >
    > The last error message sounds like it won't support the cast to the
    > System.Data.DataRow type within the <%# ...%> databinding expression. That's
    > a guess but throwing the error messages at google does what?
    >
    > --
    > <%= Clinton Gallagher
    > NET csgallagher AT metromilwaukee.com
    > URL http://clintongallagher.metromilwaukee.com/
    >
    >
    >
    > "Erica" <> wrote in message
    > news:...
    > > Clinton, Thanks for replying.
    > >
    > > I actually had a brain freeze and was thinking C#.
    > >
    > > I changed the line to the following:
    > >
    > > <%# ((System.Data.DataRow)Container.DataItem)["FileString"] %>
    > >
    > > Which makes the comma error go away, but now I'm getting the following
    > > error
    > > on that line:
    > >
    > > BC30691: 'DataRow' is a type in 'Data' and cannot be used as an
    > > expression.
    > >
    > > Any idea on what that may be?
    > >
    > > Regarding your problem, can you post some code. Thanks.
    > >
    > > "clintonG" wrote:
    > >
    > >> I'm having similar problems. Let me ask you a question about the
    > >> FileString
    > >> parameter used by the Eval method.
    > >>
    > >>
    > >> // What are the [ ] brackets for? Are they supposed to be output as text
    > >> literals?
    > >> "[\"FileString\"]"
    > >>
    > >> On the other hand -- my problem -- with the Eval method is writing out a
    > >> delineated string of text.
    > >>
    > >>
    > >> // need this ouput
    > >> 'Title'
    > >>
    > >> // is not working for me
    > >> "\'Title\'"
    > >>
    > >> Other than that and to get back to your error message...
    > >>
    > >> I wondered why you wrote the <%#... %>data binding evaluator for chr(39)?
    > >> Here's what I have learned. In ASP <%= ...%> was an evaluator for writing
    > >> variant data types to the response. Similarly when binding to a control
    > >> the
    > >> data being bound is being cast to a string data type by <%#...%>.
    > >>
    > >>
    > >> // Have you wrote this way?
    > >> <a href='javascript:popIt(java/ipix/ipix-viewer.aspx?
    > >> FileString=<%# DataBinder.Eval(Container.DataItem,
    > >> "[\"FileString\"]") & chr(39) %>, 375, 350)'
    > >> class="more">...</a>
    > >>
    > >>
    > >> <%= Clinton Gallagher
    > >> NET csgallagher AT metromilwaukee.com
    > >> URL http://clintongallagher.metromilwaukee.com/
    > >>
    > >>
    > >>
    > >>
    > >> "Erica" <> wrote in message
    > >> news:...
    > >> >I am trying to dynamically create a javascript link. But, I get the
    > >> >following
    > >> > error:
    > >> >
    > >> > BC32017: Comma, ')', or a valid expression continuation expected.
    > >> >
    > >> >
    > >> > Here is the line I try creating the link. I'm done staring at it. Can
    > >> > someone else see what may be the matter. Fresh pair of eyes maybe?
    > >> > Thanks:
    > >> >
    > >> > <a href='javascript:popIt(<%# chr(39)
    > >> > %>java/ipix/ipix-viewer.aspx?FileString=<%#
    > >> > DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>,
    > >> > 375,
    > >> > 350)' class="more">
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >
     
    Guest, Mar 15, 2007
    #5
    1. Advertisements

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. Eric Cadwell

    designer leaving line continuation in for no reason

    Eric Cadwell, Sep 27, 2003, in forum: Microsoft Dot NET
    Replies:
    0
    Views:
    186
    Eric Cadwell
    Sep 27, 2003
  2. Jasper Recto

    Line Continuation?

    Jasper Recto, Nov 6, 2003, in forum: Microsoft Dot NET
    Replies:
    2
    Views:
    185
    Fergus Cooney
    Nov 6, 2003
  3. Garry

    Expression expected

    Garry, Dec 30, 2003, in forum: Microsoft Dot NET
    Replies:
    0
    Views:
    158
    Garry
    Dec 30, 2003
  4. Guest
    Replies:
    0
    Views:
    184
    Guest
    Sep 17, 2007
  5. Khartoum

    Message - Too many continuation lines

    Khartoum, Apr 13, 2008, in forum: Microsoft Dot NET
    Replies:
    1
    Views:
    179
    Jeroen Mostert
    Apr 13, 2008
Loading...

Share This Page