473,499 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Don't Understand error

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:javascript:openWindow('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:javascript:openWindow('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
Nov 26 '05 #1
2 975
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" <wa***********@wengert.org> wrote in
news:Ox*************@TK2MSFTNGP10.phx.gbl:
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:javascript:openWindow('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:javascript:openWindow('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


--
Dec 4 '05 #2
Thanks

Wayne

"cbDevelopment" <de*****@remove.700cb.net> wrote in message
news:Xn***************************@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" <wa***********@wengert.org> wrote in
news:Ox*************@TK2MSFTNGP10.phx.gbl:
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:javascript:openWindow('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:javascript:openWindow('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


--

Dec 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1960
by: Tobias Langner | last post by:
compiling this line: SmartPtr<LongWrapper, RefCount> p1=SmartPtr<LongWrapper, RefCount>(new LongWrapper(1)); with SmartPtr being: template <class T, template <class> class OwnershipPolicy>...
20
2529
by: Sam | last post by:
Hi I'm learning to code with C++ and wrote some very simple code. I think it's consistent with every rule but always got compiling errors that I don't understand. The code include 5 files as...
16
2171
by: Jace Benson | last post by:
Ok I have read alot of things on zend.com, php.net and other sites went to the wikibooks to try to understand how to use a class. I have this project I want to do that I am sure would work great...
8
1848
by: Joshua Moore | last post by:
/* Hi, I was hoping someone could help me with this problem. I did my work and worked my way through the usual compiler messages, but I have run against some problem I can't identify. The compiler...
31
1880
by: Jo | last post by:
class A { public: char text_a; A() { *text_a=0; } ~A() {} }; //-----------------------------------------------------------------------------
38
1996
by: Jonathan Wood | last post by:
The following code raises the error "Specified cast is not valid." MembershipUser user = Membership.GetUser(userId); DataSet ds = DataLayer.ExecQueryData("SELECT * FROM mc_Clients WHERE...
3
1539
by: Ben Thomas | last post by:
Hello, I have the following code which I don't understand why it works : #include <iostream> using namespace std; void DontWork (unsigned int& i) { cout << i << endl; }
0
1769
by: Stef Mientki | last post by:
hello, I've syntax error which I totally don't understand: ########## mainfile : import test_upframe2 if __name__ == '__main__': var1 = 33 code = 'print var1 + 3 \n'
0
320
by: Stef Mientki | last post by:
Terry Reedy wrote: sorry, don't know how this happened, as I always copy/paste ? AFAIK locals() == sys._getframe(0).f_locals AFAIK, again one level up weird, I use it in 2.5 and if I remember...
5
2575
by: Thierry | last post by:
Hello fellow pythonists, I'm a relatively new python developer, and I try to adjust my understanding about "how things works" to python, but I have hit a block, that I cannot understand. I...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.