PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.

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

 
 
=?Utf-8?B?RXJpY2E=?=
Guest
Posts: n/a
 
      13th Mar 2007
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">

 
Reply With Quote
 
 
 
 
clintonG
Guest
Posts: n/a
 
      15th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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">
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpY2E=?=
Guest
Posts: n/a
 
      15th Mar 2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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">
> >

>
>
>

 
Reply With Quote
 
clintonG
Guest
Posts: n/a
 
      15th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >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">
>> >

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?RXJpY2E=?=
Guest
Posts: n/a
 
      15th Mar 2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> >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">
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuation from Miz Ging =?Utf-8?B?TWl6Z2luZw==?= Windows XP General 1 6th Apr 2005 09:11 PM
Windows Explorer [Continuation of an earlier thread] Robert Davies Windows XP Performance 1 5th Jan 2004 03:22 PM
continuation of my prob. recording from tv denizk Windows XP Video 0 22nd Nov 2003 01:05 AM
Q 331923 (Continuation) Donna Windows XP General 2 27th Aug 2003 06:54 PM
setup cannot copy files ---- continuation (just afraid no one will see it) Alex Marchevskiy Windows XP Hardware 0 25th Aug 2003 11:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:48 AM.