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

Asked By Eric on 13-Mar-07 04:01 PM
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:

%>java/ipix/ipix-viewer.aspx?FileString=<%#
DataBinder.Eval(Container.DataItem, "[\"FileString\"]") & chr(39) %>, 375,
350)' class="more">




clintonG replied on 14-Mar-07 06:23 PM
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?

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

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?
FileString=<%# DataBinder.Eval(Container.DataItem,
class="more">...</a>


NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
Eric replied on 15-Mar-07 09:04 AM
Clinton, Thanks for replying.

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

I changed the line to the following:


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 replied on 15-Mar-07 11:02 AM
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?

--
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
Eric replied on 15-Mar-07 04:35 PM
After hours of trying different variations of the code, this is what finally
fixed my problem:


Thanks Clinton for replying to my problem.