Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Don't Understand error

Reply
Thread Tools

Don't Understand error

 
 
Wayne Wengert
Guest
Posts: n/a
 
      11-26-2005
I am using a Gridview in an ASP.NET 2.0 (VB) application. In a hyperlink
template column I want to build a url wich includes passing a couple of
query strings that I need to populate dynamically.

When that code is as shown here - it works fine:
======================
NavigateUrl=
<%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=4', 600,
400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>

text="View">

======================

When I change the code to:
======================
NavigateUrl=
<%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=" +
DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10
,10 );" %>

text="View">

==============================

VWD 2005 flags the line with the error "')' expected" ?



Something about the DataBinderEval process seems to be triggering the error
and I cannot see the problem. Any thoughts will be much appreciated!



Wayne


 
Reply With Quote
 
 
 
 
cbDevelopment
Guest
Posts: n/a
 
      12-04-2005
You are replacing the ID with a dynamic value. Your string is not
properly formatted:

You have (only relevant part):

xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id")', 600,

It should be:

xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id") + "', 600,

Notice the + " after the databinder.eval statement.

----
700cb Development, Inc.
http://www.700cb.net
..NET utilities, developer tools,
and enterprise solutions

"Wayne Wengert" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> I am using a Gridview in an ASP.NET 2.0 (VB) application. In a
> hyperlink template column I want to build a url wich includes passing
> a couple of query strings that I need to populate dynamically.
>
> When that code is as shown here - it works fine:
> ======================
> NavigateUrl=
> <%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=4',
> 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>
>
> text="View">
>
> ======================
>
> When I change the code to:
> ======================
> NavigateUrl=
> <%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=" +
> DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1
> ,10 ,10 );" %>
>
> text="View">
>
> ==============================
>
> VWD 2005 flags the line with the error "')' expected" ?
>
>
>
> Something about the DataBinderEval process seems to be triggering the
> error and I cannot see the problem. Any thoughts will be much
> appreciated!
>
>
>
> Wayne
>
>
>




--
 
Reply With Quote
 
 
 
 
Wayne Wengert
Guest
Posts: n/a
 
      12-04-2005
Thanks

Wayne

"cbDevelopment" <dev2005@remove.700cb.net> wrote in message
news:Xns97225226E3860cbDevelopment@207.46.248.16.. .
> You are replacing the ID with a dynamic value. Your string is not
> properly formatted:
>
> You have (only relevant part):
>
> xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id")', 600,
>
> It should be:
>
> xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id") + "', 600,
>
> Notice the + " after the databinder.eval statement.
>
> ----
> 700cb Development, Inc.
> http://www.700cb.net
> .NET utilities, developer tools,
> and enterprise solutions
>
> "Wayne Wengert" <(E-Mail Removed)> wrote in
> news:(E-Mail Removed):
>
>> I am using a Gridview in an ASP.NET 2.0 (VB) application. In a
>> hyperlink template column I want to build a url wich includes passing
>> a couple of query strings that I need to populate dynamically.
>>
>> When that code is as shown here - it works fine:
>> ======================
>> NavigateUrl=
>> <%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=4',
>> 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>
>>
>> text="View">
>>
>> ======================
>>
>> When I change the code to:
>> ======================
>> NavigateUrl=
>> <%#"javascript:javascriptpenWindow('ViewNominati onText.aspx?id=" +
>> DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1
>> ,10 ,10 );" %>
>>
>> text="View">
>>
>> ==============================
>>
>> VWD 2005 flags the line with the error "')' expected" ?
>>
>>
>>
>> Something about the DataBinderEval process seems to be triggering the
>> error and I cannot see the problem. Any thoughts will be much
>> appreciated!
>>
>>
>>
>> Wayne
>>
>>
>>

>
>
>
> --



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
an error on multi-source, but I can't understand... Neil VHDL 11 03-11-2010 03:15 PM
don't understand error m miller ASP .Net 4 09-08-2006 06:58 PM
Read all of this to understand how it works. then check around on otherRead all of this to understand how it works. then check around on other thelisa martin Computer Support 2 08-18-2005 06:40 AM
Error message I don't understand simon ASP .Net 1 12-05-2003 03:54 PM
Need help to understand this code error 'server error in /online application' Ketul Patel ASP .Net 1 11-29-2003 04:10 PM



Advertisments