By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

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

P: n/a
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">

Mar 13 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" <Er***@discussions.microsoft.comwrote in message
news:C3**********************************@microsof t.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">

Mar 14 '07 #2

P: n/a
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" <Er***@discussions.microsoft.comwrote in message
news:C3**********************************@microsof t.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">


Mar 15 '07 #3

P: n/a
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" <Er***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
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" <Er***@discussions.microsoft.comwrote in message
news:C3**********************************@microso ft.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">



Mar 15 '07 #4

P: n/a
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" <Er***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
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" <Er***@discussions.microsoft.comwrote in message
news:C3**********************************@microsof t.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">



Mar 15 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.