Home All Groups Group Topic Archive Search About
Author
26 Nov 2005 5:06 PM
Wayne Wengert
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('ViewNominationText.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('ViewNominationText.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

Author
4 Dec 2005 1:04 PM
cbDevelopment
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

Show quoteHide quote
"Wayne Wengert" <wayneSKIPSPAM@wengert.org> wrote in
news:OxCdDvq8FHA.608@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('ViewNominationText.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('ViewNominationText.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
>
>
>



--
Are all your drivers up to date? click for free checkup

Author
4 Dec 2005 5:41 PM
Wayne Wengert
Thanks

Wayne

Show quoteHide quote
"cbDevelopment" <dev2***@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" <wayneSKIPSPAM@wengert.org> wrote in
> news:OxCdDvq8FHA.608@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('ViewNominationText.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('ViewNominationText.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
>>
>>
>>
>
>
>
> --

Bookmark and Share