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

G

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">
 
C

clintonG

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/
 
G

Guest

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 said:
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 said:
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">
 
C

clintonG

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 said:
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 said:
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 said:
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">
 
G

Guest

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 said:
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 said:
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 said:
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/




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

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

Ask a Question

Top