|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Don't Understand errortemplate 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 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 > > > -- 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 >> >> >> > > > > --
Other interesting topics
TreeView problem
Deploying ASP.NET 2.0 Web Development articles - where can I find some? how to parse deeper nested tags in custom control ## in ASP.NET 2.0 DataGrid Pagin Problem Multilanguage calendar... How and when should I use CacheItemPriority.NotRemovable? Strange Behavior ASPnet_Wp.exe Rols/rights in asp 2.0 |
|||||||||||||||||||||||